BlueBook

p287ex5 - Digits

Determine the number of digits in a given number. A negative number has the same number of digits as its absolute value: for example, -12 has 2 digits; the negative sign is not a digit.

Input

The first line of input contains an integer T (1 ≤ T ≤ 10 000): the number of cases to follow. Each of the following T lines contains an integer N (-106 < N < 106), with no leading zeroes.

Output

The number of digits in the integer given. Answers to the test cases should be printed in order.

Sample Input

4
123
1
-12
0

Sample Output

3
1
2
1

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 26, 2008

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

There's only one test case for this program. How about including negatives, and 0?

notice how the individual test case can have up to 10000 integers for your pgoram to run on.