fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int Liczba, testy, Cyfry;
  8. testy = Convert.ToInt32(Console.ReadLine());
  9. while(testy-- != 0)
  10. {
  11. Liczba = Convert.ToInt32(Console.ReadLine());
  12. if(Liczba != 0)
  13. Cyfry = Math.Abs(Liczba).ToString().Length;
  14. else
  15. Cyfry = 0;
  16. Console.WriteLine(Cyfry);
  17. }
  18. }
  19. }
Success #stdin #stdout 0.04s 33912KB
stdin
6
-15
-1
0
1
15
1234
stdout
2
1
0
1
2
4