結果

問題 No.193 筒の数式
ユーザー yumechi
提出日時 2015-04-26 22:56:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 426 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-05 03:14:48
合計ジャッジ時間 1,364 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
maxnum = -9999999999999999999999999
length = len(S)
ckecknum = lambda x: not (x == "+" or x == "-")
for i in range(length):
    line = S[i:length] + S[0:i]

    # frist and end check
    first = line[0]
    end = line[length - 1]
    if not ckecknum(first) or not ckecknum(end):
        line = ""
        continue
    
    try:
        maxnum = max(maxnum, eval(line))
    except:
        pass
print(maxnum)
     
0