Let's Go Shopping!
Easy Accuracy: 28.8% Submissions: 125 Points: 2

A person visits a merchandise showroom and sees 5 items available, T-shirts - Rs 1000, bags- Rs 2000, Jackets - Rs 3000, Ball - Rs 4000 , Shoes - Rs 5000. All items of same type are priced the same and there are at least 100 pieces of every item available. Also there was an offer buy 2 get 1 free on same item. So, he decided to buy some stuff, but he had only one condition that number of items he takes home should be minimum.

Input:
First line of the input is Number of test cases T. Each test case contain the money you have.

Output:
Minimum number of item you can purchase in total money you have. Otherwise print "No"

Constraints:
1 <= T <= 100
1 <= N <= 105

Example:
Input:

2
22000
3500

Output:
6
No

Explanation:
For Rs 22000 he will buy 1 ball for 4000, 1 jacket for 3000 & 3 shoes for 15000 and he will get 1 extra pair of shoes free. On total making it 6 items.

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.