BlueBook - Cost
Time: 1 s
Memory: 125 MB
Memory: 125 MB
BlueBook
Given an integer N (0≤N≤100000) representing the mass of a letter in grams, print out the cost in cents to mail the letter.
The first line of input will be the number of test cases T (1≤T≤100). The following T lines will contain N. Output the cost in cents to mail the letter.
The pricing is as follows:
0≤N≤30 costs 38 cents
30<N≤50 costs 55 cents
50<N≤100 costs 73 cents
if N>100 then the base cost is 73 cents, plus 24 cents for every additional 50 grams or part thereof.
Given an integer N (0≤N≤100000) representing the mass of a letter in grams, print out the cost in cents to mail the letter.
The first line of input will be the number of test cases T (1≤T≤100). The following T lines will contain N. Output the cost in cents to mail the letter.
The pricing is as follows:
0≤N≤30 costs 38 cents
30<N≤50 costs 55 cents
50<N≤100 costs 73 cents
if N>100 then the base cost is 73 cents, plus 24 cents for every additional 50 grams or part thereof.
Input
The first line of input will be the number of test cases T (1≤T≤100). The following T lines will contain N.
Output
Output the cost in cents to mail the letter.
Examples
| Input | Output |
|---|---|
|
2
5 101 |
38
97 |
Problem Info
| Problem ID | 466 |
| Time Limit | 1000 ms |
| Memory Limit | 128000 KB |
| Moderators | pixelarco |
Statistics
Submit
You need to Login or Registration for submit your solution