eolymp
bolt
Try our new interface for solving problems
Problems

Sum of digits

Sum of digits

You are given a number $n$. You have to find the sum of digits of $n$. \InputFile The first line contains the number of test cases $t~(t < 100)$. Each of the next $t$ lines contains the number $n~(1 \le n \le 10^{50})$ which sum of digits you have to calculate. \OutputFile Output $t$ lines containing the sum of digits of the numbers.
Time limit 1 second
Memory limit 128 MiB
Input example #1
3
123
43
78903
Output example #1
6
7
27
Author Michael Medvediev