Somma delle cifre
Dato un numero intero, stampa la somma delle sue cifre.
Input | Output |
|---|---|
123 | 6 |
12 | 3 |
3 | 3 |
Constraints
Time limit: 1.6 seconds
Memory limit: 512 MB
Output limit: 1 MB
Dato un numero intero, stampa la somma delle sue cifre.
Input | Output |
|---|---|
123 | 6 |
12 | 3 |
3 | 3 |
Time limit: 1.6 seconds
Memory limit: 512 MB
Output limit: 1 MB