Add Digits (Bonus)


Submit solution

Points: 10 (partial)
Time limit: 5.0s
Memory limit: 64M

Authors:
Problem type

題目說明

輸入一個二位數或三位數的數字,輸出各位數的加總 若加總的數字仍是二位數,需再算出其各位數的加總 (輸出最後的數字就好)

輸入限制: 均>=0

輸入

正整數

輸出

各位數的總和

sample input1

56

sample output1

2

sample input2

352

sample output2

1

Comments

There are no comments at the moment.