← ~/問題
P2000

Sum of Digits

Easy
// 問題文
Given a non-negative integer n, output the sum of its decimal digits.
// 入力
A single line containing one integer n (0 <= n <= 10^18).
// 出力
A single integer: the sum of the decimal digits of n.
// ヒント
Read the number as a string and add up the characters.
// サンプル
入力例
12345
出力例
15
// 問題情報
難易度Easy
正解率50%
制限時間1000 ms
メモリ制限65536 KB
正解5