結果

問題 No.49 算数の宿題
ユーザー 👑 rin204rin204
提出日時 2022-01-20 21:04:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 231 bytes
コンパイル時間 470 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 71,412 KB
最終ジャッジ日時 2023-08-24 17:51:08
合計ジャッジ時間 1,799 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,168 KB
testcase_01 AC 77 ms
71,412 KB
testcase_02 AC 76 ms
71,172 KB
testcase_03 AC 76 ms
71,084 KB
testcase_04 AC 77 ms
71,288 KB
testcase_05 AC 77 ms
71,252 KB
testcase_06 AC 76 ms
71,320 KB
testcase_07 AC 75 ms
71,288 KB
testcase_08 AC 75 ms
71,244 KB
testcase_09 AC 77 ms
71,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input() + "*"
ans = 0
ope = "*"
T = ""
for s in S:
    if s.isdigit():
        T += s
    else:
        if ope == "*":
            ans += int(T)
        else:
            ans *= int(T)
        T = ""
        ope = s

print(ans)
0