結果
| 問題 | No.49 算数の宿題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-20 16:05:04 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
不安定
|
| 実行時間 | 61 ms / 5,000 ms |
| + 155µs | |
| コード長 | 251 bytes |
| 記録 | |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 62,144 KB |
| 実行使用メモリ | 62,880 KB |
| 最終ジャッジ日時 | 2026-10-15 14:06:10 |
| 合計ジャッジ時間 | 2,441 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
import re
S = raw_input()
operands = map(int, re.split(r"[+*]", S))
operators = filter(lambda x: not x.isdigit(), S)
ans = operands.pop(0)
for x, y in zip(operands, operators):
if y == '+':
ans *= x
else:
ans += x
print ans