ALCATRAZ1  SUM OF DIGITS
You are being given a number N. (1<=N<=10^50) . You have to print the sum of digits of that particular number.
Input
The first line will contain T, the number of testcases (T<10) . The next T lines will contain the numbers whose sum of digits you have to calculate .
Output
Output T lines containing the Sum of Digits of the numbers .
Example
Input: 3 123123123 3434 1234567890 Output: 18 14 45
hide comments
sonukumar:
20210304 17:49:40
use no. as a string Last edit: 20210304 17:49:57 

williams_sma2:
20210120 03:19:49
Im using int for the number and the output is correct,why i have WA in SPOJ?


gourab13:
20200623 11:34:45
Showing success in ideoneit but wrong answer while running judge... 

rs481441:
20200402 10:15:09
In java use string to solve by using charAt to get elements from string


rahatkhan99:
20191126 08:13:30
you can solve it using string normally..just calculate the sum of all charecters of the string :) 

vikash:
20191018 07:50:25
Not for Java or Scala. You will always get TLE . 

importme:
20190923 10:16:29
Use STL string.... 

light_blue:
20190616 20:17:05
ac in one go haha sooooooooooo 

karankeswani99:
20190116 16:53:16
AC in one go :)


dwzy:
20181218 02:45:38
java TLE :( 
Added by:  Alcatraz 
Date:  20161104 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 GOSU 