Let's Go Shopping!
Submissions: 116   Accuracy:

26.71%

  Difficulty: Easy   Marks: 2

A person visits a Nike 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<= 100000

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.

** For More Input/Output Examples Use 'Expected Output' option **

Author: Shikhar


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.