結果

問題 No.193 筒の数式
ユーザー karinohitokarinohito
提出日時 2024-05-08 02:12:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 1,000 ms
コード長 409 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 82,352 KB
実行使用メモリ 53,616 KB
最終ジャッジ日時 2024-12-14 01:39:14
合計ジャッジ時間 1,875 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
an=-10**18
for i in range(len(S)):
    T=S    
    
    if T[0].isdigit() and T[-1].isdigit():
        for i in range(len(S)):
            T=T.replace('+0','+')
            T=T.replace('-0','-')
        while T[0]=='0':
            T=T[1::]
        if not T[0].isdigit():
            T='0'+T
        if not T[-1].isdigit():
            T=T+'0'
        an=max(an,eval(T))
    S=S[1::]+S[0]

print(an)
0