[TS10 Lâm Đồng 26-27] Tổng các chữ số

View as PDF

Submit


Problem type
Allowed languages
C++, Pascal, Python
Points: 1 Time limit: 1.0s Memory limit: 256M Input: stdin Output: stdout

Cho số nguyên dương \(n\) (\(1\le n\le10^{12}\)).

Dữ liệu vào

Một dòng chứa \(n\).

Kết quả

In tổng các chữ số của \(n\).

Ví dụ
Input

123456

Output

21

Comments

Most recent
Loading comments...

There are no comments at the moment.