1236 - Sort The Number
Time Limit : 1 Second
Memory Limit : 128 MB
- Given two integer N, M, can you tell me how many numbers are lexicographically less than M among the numbers from 1 to N(inclusive) ?
eg. 23 is lexicographically less than 25, while 10 is lexicographically less than 2.
- There are multi-cases, each case per line with two integer N, M ( 1<=N, M<=1000000000)
- For each case output an integer representing the total numbers satisfying the condition in the description.
- sample input
3 4 10 11 1 1
- sample output
3 2 0