Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

I Love 0

By Nasif_44th · Limits 1s, 512 MB

Since childhood Abir loved to play with numbers, one day he was counting numbers from 1 to 100 and he found out that there were 10 numbers that had 0 as its last digit. The numbers are 10, 20, 30, 40, 50, 60, 70, 80, 90, 100. He wants you to find how many numbers that have 0 as last digit from 1 to N.

Input

You will be given an integer T (1 ≤ T ≤ 17) in the first line. In next T lines there will be an integer N (1 ≤ N ≤ 109).

Output

In each case, print the total count of numbers from 1 to N those have a 0 as their last digit.

Sample

InputOutput
3
10
100
5
1
10
0


Discussion
Statistics

97% Solution Ratio

shojib_muEarliest, 4M ago

shojib_muFastest, 0.0s

shojib_muLightest, 0 B

mashfiqur404Shortest, 40B

Submit

Login to submit