Submit solution
Points:
3
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Java
Given a number, find the sum of each digit in it.
Input
A positive integer less then 1 billion.
Output
The sum of all digits in the integer.
Sample Input
12
Sample Output
3
Comments