Tap here to switch tabs
Problem
Submissions

Problem: Count Special Integers

Count Special Integers asks you to count every number from 1 through a given positive integer n whose decimal digits are all different.

Statement

Given a positive integer n, return the count of special integers in the inclusive range from 11 to n.

A positive integer is considered special if all of its digits are unique.

Constraints:

  • 1≤1 \leq n ≤2×109\leq 2 \times 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Special Integers

Count Special Integers asks you to count every number from 1 through a given positive integer n whose decimal digits are all different.

Statement

Given a positive integer n, return the count of special integers in the inclusive range from 11 to n.

A positive integer is considered special if all of its digits are unique.

Constraints:

  • 1≤1 \leq n ≤2×109\leq 2 \times 10^9