文理学院程序设计在线练习


Fans数

Time Limit: 1 Second(s)    Memory Limit: 32 MB

Total Submission(s): 1152   Accepted Submission(s): 960
Problem Description

正整数的各位数字之和被fans称为Fans数。求输入数n(0<n<1000000000)的Fans数!

Sample Input
12345
56123
82
Sample Output
15
17
10
Source

ZJUT