Tổng Chữ Số - DIGITSUM

PDF

Submit solution

Points: 10.00 (partial)
Time limit: 1.0s
Memory limit: 64M
Input: stdin
Output: stdout

Problem types
Allowed languages
C, C++, Java, Pascal, Python, Scratch, TEXT

Viết chương trình nhập vào số nguyên dương ~n~

Yêu cầu

Tính tổng các chữ số trong biểu diễn thập phân của ~n~.

Dữ liệu

Một dòng duy nhất ghi số nguyên dương ~n~ ~(n \le 10^{18})~.

Kết quả

Ghi ra một số nguyên duy nhất là tổng các chữ số của ~n~.

Input

1234

Output

10

Comments

Please read the guidelines before commenting.


There are no comments at the moment.