桁の合計
整数が与えられたとき、その桁の合計を表示します。
入力 | 出力 |
|---|---|
123 | 6 |
12 | 3 |
3 | 3 |
Constraints
Time limit: 1.6 seconds
Memory limit: 512 MB
Output limit: 1 MB
To check your solution you need to sign in
Sign in to continue
Sign in to your account
整数が与えられたとき、その桁の合計を表示します。
入力 | 出力 |
|---|---|
123 | 6 |
12 | 3 |
3 | 3 |
Time limit: 1.6 seconds
Memory limit: 512 MB
Output limit: 1 MB
Sign in to your account