游客 Signup | Login
中文 | En

3895 - 5.2 求一个整数各位数字之和

通过次数

0

提交次数

0

Time Limit : 1 秒 Memory Limit : 128 MB

编写一个方法,计算一个整数各位数字之和:

public static int sumDigits(long n)

例如:sumDigits(long n) 返回92+3+4)。

Input

输入一个整数n

Output

输出一行

The sum of digits for n is 整数n各位数字之和

Examples

Input Format

234

Output Format

The sum of digits for 234 is 9