BlueBook - Payment

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Problem type
BlueBook

Given N (0 \le N \le 1\,000\,000), you are to count how many times N falls into any of the 6 ranges given below.

Range A 0 \ldots 9\,999
Range B 10\,000 \ldots 19\,999
Range C 20\,000 \ldots 29\,999
Range D 30\,000 \ldots 39\,999
Range E 40\,000 \ldots 49\,999
Range F 50\,000 \ldots 1\,000\,000

Input Specification

Input consists of bunch of integers (0 \le N \le 1\,000\,000) which will be terminated by -1.
There will always be less than 10\,000 integers.

Output Specification

Output the number of occurences of N in the ranges A..F. Output 0 if N was never found for that particular range.
Do not include -1 into your calculations.

Sample Input

1
9999
10001
1000000
29999
-1

Sample Output

2
1
1
0
0
1

Comments

There are no comments at the moment.