Add All Numbers


Submit solution

Points: 30 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem types
Allowed languages
Java 19, Java 8

題目說明

輸入8位數
輸出所有位數的和

輸入

長度為8的數字,首位數不為0

輸出

此8位數的和

測試資料0 輸入

19880215

測試資料0 輸出

34

// 1+9+8+8+0+2+1+5=34

測試資料1 輸入

20240203

測試資料1 輸出

13

測試資料2 輸入

19880740

測試資料2 輸出

37

Comments

There are no comments at the moment.