結果
問題 | No.49 算数の宿題 |
ユーザー |
![]() |
提出日時 | 2022-10-22 20:56:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 70 ms / 5,000 ms |
コード長 | 239 bytes |
コンパイル時間 | 389 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 62,976 KB |
最終ジャッジ日時 | 2024-12-23 02:17:21 |
合計ジャッジ時間 | 1,565 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
import reS = input()s = re.split('[*+]', S)res = int(s[0])cnt = 0for i in range(len(S)):if S[i] == '+':res *= int(s[cnt+1])cnt += 1elif S[i] == '*':res += int(s[cnt+1])cnt += 1print(res)