← ~/문제
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