← ~/задачи
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