Count Distinct Numbers on Board

EasyArrayHash TableMathSimulation

Solution

export function distinctIntegers(n: number): number {
  return n === 1 ? 1 : n - 1;
}