結果

問題 No.289 数字を全て足そう
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2022-09-16 05:57:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 115 ms / 1,000 ms
コード長 267 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 77,992 KB
最終ジャッジ日時 2023-08-22 21:58:32
合計ジャッジ時間 4,121 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
72,892 KB
testcase_01 AC 110 ms
72,848 KB
testcase_02 AC 114 ms
72,888 KB
testcase_03 AC 112 ms
73,124 KB
testcase_04 AC 111 ms
72,864 KB
testcase_05 AC 112 ms
77,064 KB
testcase_06 AC 112 ms
77,780 KB
testcase_07 AC 114 ms
77,872 KB
testcase_08 AC 115 ms
77,944 KB
testcase_09 AC 113 ms
77,136 KB
testcase_10 AC 112 ms
77,944 KB
testcase_11 AC 113 ms
77,900 KB
testcase_12 AC 114 ms
77,612 KB
testcase_13 AC 111 ms
77,588 KB
testcase_14 AC 112 ms
77,968 KB
testcase_15 AC 113 ms
77,856 KB
testcase_16 AC 111 ms
77,920 KB
testcase_17 AC 114 ms
77,676 KB
testcase_18 AC 112 ms
77,808 KB
testcase_19 AC 112 ms
77,712 KB
testcase_20 AC 112 ms
77,992 KB
testcase_21 AC 107 ms
72,848 KB
testcase_22 AC 113 ms
77,524 KB
testcase_23 AC 113 ms
77,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math

input = sys.stdin.readline

S = list(input())[:-1]
nums = [str(i) for i in range(10)]
ans = 0
for s in S:
    if s in nums:
        ans += int(s)
print(ans)
0