Digit Sum
You are given a non-negative integer N. Find the sum of all its digits.
Input
The input contains an integer N.
Output
Print the sum of all digits of N, without labels or trailing spaces.
Example 1:
Input:
123
Output:
6
Explanation:
1 + 2 + 3 = 6.
Example 2:
Input:
0
Output:
0
Explanation:
The digit sum of 0 is 0.
Now Your Turn!
Pick the correct output for the given inputInput:
83220
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 0 <= N <= 100000