結果
| 問題 | No.193 筒の数式 |
| ユーザー |
👑 |
| 提出日時 | 2022-01-20 08:38:35 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 33 ms / 1,000 ms |
| + 447µs | |
| コード長 | 560 bytes |
| 記録 | |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 64,420 KB |
| 実行使用メモリ | 53,592 KB |
| 最終ジャッジ日時 | 2026-11-13 11:08:11 |
| 合計ジャッジ時間 | 2,767 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
S = input()
ans = -1 << 30
for _ in range(10):
if S[0].isdigit() and S[-1].isdigit():
tmp = 0
ope = "+"
T = ""
for s in S:
if s.isdigit():
T += s
else:
if ope == "+":
tmp += int(T)
else:
tmp -= int(T)
ope = s
T = ""
if ope == "+":
tmp += int(T)
else:
tmp -= int(T)
ope = s
ans = max(ans, tmp)
S = S[1:] + S[0]
print(ans)