結果
問題 |
No.49 算数の宿題
|
ユーザー |
![]() |
提出日時 | 2019-02-14 13:35:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 262 bytes |
コンパイル時間 | 252 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-12-23 02:01:04 |
合計ジャッジ時間 | 1,108 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 10 |
ソースコード
s = input() res = 0 num = 0 ns = '' op = '*' for c in s: if c == '*' or c == '+': if op == '*': res += num elif op == '+': res *= num ns = '' else: ns += c num = int(ns) print(res)