Canadian Computing Competition: 2009 Stage 1, Senior #1
Eric likes interesting numbers like
Input Specification
On the first line of input, you are given an integer
Output Specification
The output should be the number of cool numbers in the range
Sample Input 1
Copy
1
100
Sample Output 1
Copy
2
Sample Input 2
Copy
100
1000
Sample Output 2
Copy
1
Comments
Bro I almost got this but it always exceeds my time limit.
The amount of cool numbers from 1 to 100000000 isn't big. Try pre-computing all the cool numbers.