結果

問題 No.289 数字を全て足そう
コンテスト
ユーザー Navier_Boltzmann
提出日時 2022-09-16 05:57:29
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 36 ms / 1,000 ms
+ 402µs
コード長 267 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 73 ms
コンパイル使用メモリ 80,384 KB
実行使用メモリ 65,408 KB
最終ジャッジ日時 2026-10-04 22:00:13
合計ジャッジ時間 2,502 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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