結果

問題 No.193 筒の数式
ユーザー fmhrfmhr
提出日時 2015-04-27 00:32:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 277 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 10,576 KB
実行使用メモリ 9,092 KB
最終ジャッジ日時 2023-09-18 12:27:58
合計ジャッジ時間 1,529 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 26 ms
8,984 KB
testcase_03 AC 25 ms
9,044 KB
testcase_04 AC 26 ms
9,000 KB
testcase_05 AC 26 ms
8,960 KB
testcase_06 AC 26 ms
8,976 KB
testcase_07 AC 25 ms
9,048 KB
testcase_08 AC 26 ms
8,992 KB
testcase_09 AC 26 ms
8,928 KB
testcase_10 AC 26 ms
8,988 KB
testcase_11 AC 25 ms
9,056 KB
testcase_12 AC 25 ms
9,092 KB
testcase_13 AC 25 ms
8,992 KB
testcase_14 AC 25 ms
8,916 KB
testcase_15 AC 25 ms
8,980 KB
testcase_16 AC 25 ms
8,980 KB
testcase_17 AC 25 ms
8,984 KB
testcase_18 AC 26 ms
8,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = str(input())
import re
ans = eval(S)
for i in range(1, len(S)):
    s = S[i:]+S[:i]
    s = re.sub(r'\b0+(?!\b)', '', s)
    # print(s)
    if s[0] in '+-' or s[len(s)-1] in '+-':
        continue
    try:
        ans = max(ans, eval(s))
    except:
        pass
print(ans)
0