UniqueDigits
SRM 280 · 2005-12-28 · by dimkadimon
SRM 280 · 2005-12-28 · by dimkadimon · Brute Force
Problem Statement
Problem Statement
Given an
Constraints
- n will be between 1 and 10000 inclusive.
Examples
0)
21 Returns: 19
We count all integers between 1 and 20, except 11.
1)
101 Returns: 90
2)
1001 Returns: 738
3)
1 Returns: 0
4)
2 Returns: 1
Submissions are judged against all 24 archived test cases, of which 5 are shown here. Case numbers match the judge’s.
Coding Area
Language: C++17 · define a public class UniqueDigits with a public method int count(int n) · 24 test cases · 2 s / 256 MB per case