結果
問題 | No.49 算数の宿題 |
ユーザー |
|
提出日時 | 2021-11-23 08:02:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 263 bytes |
コンパイル時間 | 803 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-23 02:16:16 |
合計ジャッジ時間 | 1,160 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
Main.py:5: SyntaxWarning: invalid escape sequence '\d' op = re.split('\d+', S)
ソースコード
import reS = input()op = re.split('\d+', S)ope = re.split('[+*]', S)ans = int(ope[0])j = 1for i in range(len(op)):if op[i] == '*':ans += int(ope[j])j += 1elif op[i] == '+':ans *= int(ope[j])j += 1print(ans)