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 \dots 9\,999
Range B 10\,000 \dots 19\,999
Range C 20\,000 \dots 29\,999
Range D 30\,000 \dots 39\,999
Range E 40\,000 \dots 49\,999
Range F 50\,000 \dots 1\,000\,000

Input Specification

Input consists of a 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 occurrences of N in the ranges AF. Output 0 if N was never found for that particular range.
Do not include -1 in 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.