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

Submit

Login to submit.

Statistics

95% Solution Ratio
shojib_muEarliest, Jul '19
shojib_muFastest, 0.0s
shojib_muLightest, 0 B
Nusab19Shortest, 34B
Toph uses cookies. By continuing you agree to our Cookie Policy.