p287ex5 - DigitsDetermine 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.
InputThe 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.
OutputThe number of digits in the integer given. Answers to the test cases should be printed in order.
4 123 1 -12 0
3 1 2 1
Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 26, 2008
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3