Sum of Digits
Print the sum of the decimal digits of N.
Input: one integer N.
Output: the digit sum of N.
Constraints:
- 0 ≤ N ≤ 1018
Sample Tests
Input 1
1234
Output 1
10
Input 2
999999999999999999
Output 2
162
Discussion (opens after you solve — no spoilers before)
No comments yet.