結果
| 問題 | No.49 算数の宿題 |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2020-12-02 15:52:51 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 33 ms / 5,000 ms |
| + 570µs | |
| コード長 | 315 bytes |
| 記録 | |
| コンパイル時間 | 88 ms |
| コンパイル使用メモリ | 64,648 KB |
| 実行使用メモリ | 53,660 KB |
| 最終ジャッジ日時 | 2026-10-15 14:28:41 |
| 合計ジャッジ時間 | 1,883 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
a = 0
st1 = []
st2 = []
for i in input()+"+":
if i=="*":
st1.append(a)
a = 0
st2.append(0)
elif i=="+":
st1.append(a)
a = 0
st2.append(1)
else:
a = a*10+int(i)
ans = st1[0]
for i,s in zip(st1[1:],st2):
if s: ans*=i
else: ans+=i
print(ans)
convexineq