BlueBook - Cost

View as PDF

Submit solution

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

Problem types
BlueBook

Given an integer N (0 \le N \le 100\,000) 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 \le T \le 100). The following T lines will contain N. Output the cost in cents to mail the letter.

The pricing is as follows:

0 \le N \le 30 costs 38 cents
30 < N \le 50 costs 55 cents
50 < N \le 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 Specification

The first line of input will be the number of test cases T (1 \le T \le 100). The following T lines will contain N.

Output Specification

Output the cost in cents to mail the letter.

Sample Input

2
5
101

Sample Output

38
97

Comments

There are no comments at the moment.