結果
問題 |
No.49 算数の宿題
|
ユーザー |
|
提出日時 | 2022-03-30 17:13:20 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 249 bytes |
コンパイル時間 | 182 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 64,896 KB |
最終ジャッジ日時 | 2024-12-23 02:16:37 |
合計ジャッジ時間 | 1,605 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 10 |
ソースコード
S = input() l = list(map(int,S.split("*+"))) op = ["+"] for s in S: if s == "*" or s == "+": op.append(s) ans = 0 for i in range(len(op)): t = l[i] p = op[i] if p == "+": ans += t else: ans *= t print(ans)