結果

問題 No.193 筒の数式
ユーザー 👑 KazunKazun
提出日時 2020-11-13 04:30:23
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 237 bytes
コンパイル時間 507 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 79,128 KB
最終ジャッジ日時 2023-09-30 01:56:00
合計ジャッジ時間 3,538 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 71 ms
71,384 KB
testcase_03 AC 71 ms
71,388 KB
testcase_04 AC 71 ms
71,288 KB
testcase_05 AC 69 ms
71,088 KB
testcase_06 AC 69 ms
71,432 KB
testcase_07 AC 70 ms
71,396 KB
testcase_08 AC 70 ms
71,400 KB
testcase_09 AC 70 ms
71,092 KB
testcase_10 AC 68 ms
71,396 KB
testcase_11 AC 68 ms
71,448 KB
testcase_12 AC 68 ms
71,152 KB
testcase_13 AC 66 ms
71,560 KB
testcase_14 AC 70 ms
71,388 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
N=len(S)

X=-1
for _ in range(N):
    F=1
    for i in range(N-1):
        if S[i:i+2] in {"++","+-","-+","--"}:
            F=0
    if {S[0],S[-1]} & {"+","-"}:
        F=0
    if F:X=max(X,eval(S))
    S=S[-1]+S[:-1]
print(X)
0