結果

問題 No.289 数字を全て足そう
ユーザー pajannatpajannat
提出日時 2021-04-04 22:35:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 1,000 ms
コード長 188 bytes
コンパイル時間 1,540 ms
コンパイル使用メモリ 86,788 KB
実行使用メモリ 76,428 KB
最終ジャッジ日時 2023-08-28 09:54:21
合計ジャッジ時間 4,502 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,144 KB
testcase_01 AC 73 ms
71,424 KB
testcase_02 AC 71 ms
71,384 KB
testcase_03 AC 71 ms
71,220 KB
testcase_04 AC 71 ms
71,064 KB
testcase_05 AC 82 ms
76,268 KB
testcase_06 AC 77 ms
75,960 KB
testcase_07 AC 80 ms
76,224 KB
testcase_08 AC 79 ms
76,428 KB
testcase_09 AC 78 ms
76,264 KB
testcase_10 AC 76 ms
76,024 KB
testcase_11 AC 77 ms
76,260 KB
testcase_12 AC 79 ms
76,304 KB
testcase_13 AC 78 ms
76,256 KB
testcase_14 AC 79 ms
76,288 KB
testcase_15 AC 79 ms
76,316 KB
testcase_16 AC 77 ms
76,292 KB
testcase_17 AC 79 ms
76,308 KB
testcase_18 AC 78 ms
76,252 KB
testcase_19 AC 78 ms
76,300 KB
testcase_20 AC 78 ms
76,252 KB
testcase_21 AC 72 ms
71,412 KB
testcase_22 AC 80 ms
76,256 KB
testcase_23 AC 78 ms
76,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()

# 合計値
sum = 0

# 文字を数値と比較、合計値に加算
for i in range(len(S)):
	for j in range(10):
		if S[i] == str(j):
			sum += int(S[i])
print(sum)
0