BlueBook - Payment

View as PDF

Submit solution

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

Problem type
BlueBook

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

Range A 09999
Range B 1000019999
Range C 2000029999
Range D 3000039999
Range E 4000049999
Range F 500001000000

Input Specification

Input consists of a bunch of integers (0N1000000) which will be terminated by -1.
There will always be less than 10000 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

Copy
1
9999
10001
1000000
29999
-1

Sample Output

Copy
2
1
1
0
0
1

Comments

There are no comments at the moment.