| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 518 | 447 | 417 | 89.103% |
There are many ways to count the frequencies of letters but can they be applied to digits?
Given a range (in the form of two integers) and a digit (0-9), you are to count how many occurrences of the digit there are in the given range.
There is only one input line; it provides the range and the digit. Each integer for the range will be between 1000 and 9999 (inclusive) and the digit will be between 0 and 9 (inclusive). Assume the first integer for the range is not greater than the second integer for the range.
Print the number of occurrences of the digit in the given range.
1000 1000 0
3
1000 1001 0
5
8996 9004 5
0
9800 9900 5
20