Suma dígitos


Submit solution

Points: 10
Time limit: 5.0s
Memory limit: 256M

Author:
Problem types
Allowed languages
C#, Go, Java

Dado un número entero positivo, realiza la suma de sus dígitos.

Input Format

Un número entero positvo N.

Constraints

0 <= N <= 2147483647

Output Format

Un número entero.

Sample Input 0

123

Sample Output 0

6

Sample Input 1

11111

Sample Output 1

5

Sample Input 2

100000

Sample Output 2

1

Sample Input 3

2147483647

Sample Output 3

46

Autoria: Rusben

CC BY-NC-SA 4.0