Too many items solution codechef- Chef bought N items from a shop. Although it is hard to carry all these items in hand, so Chef has to buy some polybags to store these items.

Chef bought NN items from a shop. Although it is hard to carry all these items in hand, so Chef has to buy some polybags to store these items.

11 polybag can contain at most 1010 items. What is the minimum number of polybags needed by Chef?

Input Format

  • The first line will contain an integer TT – number of test cases. Then the test cases follow.
  • The first and only line of each test case contains an integer NN – the number of items bought by Chef.

Output Format

For each test case, output the minimum number of polybags required.

Constraints

  • 1T10001≤T≤1000
  • 1N10001≤N≤1000

Sample Input 1 

3
20
24
99

Sample Output 1 

2
3
10

Explanation

Test case-1: Chef will require 22 polybags. Chef can fit 1010 items in the first and second polybag each.

Test case-2: Chef will require 33 polybags. Chef can fit 1010 items in the first and second polybag each and fit the remaining 44 items in the third polybag.

  1. For Solution

    Click Here!

Leave a Comment

Your email address will not be published.