Problem Statement
Given an
Definition
- Class:
- UniqueDigits
- Method:
- count
- Parameters:
- int
- Returns:
- int
- Method signature:
- int count(int n)
- (be sure your method is public)
Constraints
- n will be between 1 and 10000 inclusive.
Examples
21
Returns: 19
We count all integers between 1 and 20, except 11.
101
Returns: 90
1001
Returns: 738
1
Returns: 0
2
Returns: 1
10000
Returns: 5274
62
Returns: 56
3090
Returns: 1795
6795
Returns: 3648
7358
Returns: 3963
2314
Returns: 1362
995
Returns: 738
6526
Returns: 3556
1408
Returns: 911
877
Returns: 657
7560
Returns: 4077
3969
Returns: 2236
6685
Returns: 3594
1871
Returns: 1173
9387
Returns: 4993
4531
Returns: 2496
10000
Returns: 5274
5000
Returns: 2754
9000
Returns: 4770