Problem Statement
Definition
- Class:
- CoolNumber
- Method:
- count
- Parameters:
- int, int
- Returns:
- int
- Method signature:
- int count(int A, int B)
- (be sure your method is public)
Constraints
- A will be between 1 and 109, inclusive.
- B will be between A and 109, inclusive.
- The difference between B and A will be at most 106.
Examples
1
50
Returns: 4
Here we've got following cool numbers: 11, 22, 33, 44.
1
1000
Returns: 135
6354
234363
Returns: 82340
1
1000000
Returns: 376413
123
123
Returns: 1
1000000
1000000
Returns: 0
999999
999999
Returns: 1
1234
563463
Returns: 216272
12345
123456
Returns: 35380
123456
987654
Returns: 335021
111111
222222
Returns: 45711
111111
111111
Returns: 1
5235
634567
Returns: 242734
111115
111116
Returns: 1
1
111115
Returns: 32928
1
124124
Returns: 38467
234
674573
Returns: 259579
1
111111
Returns: 32926
85674
674585
Returns: 233978
999000000
1000000000
Returns: 422568
423146564
424146564
Returns: 498066
888808888
889808888
Returns: 465045
111111111
112111111
Returns: 493725
123456789
124456789
Returns: 499873
764574645
764635243
Returns: 30228
943576874
944576765
Returns: 490115
563645744
564645744
Returns: 498094
987654321
988654321
Returns: 479770
253464534
254464530
Returns: 498836
111011111
111011111
Returns: 1
1
1111
Returns: 156