結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
8,948 KB
testcase_01 AC 28 ms
9,056 KB
testcase_02 AC 26 ms
8,960 KB
testcase_03 AC 25 ms
8,984 KB
testcase_04 AC 25 ms
8,968 KB
testcase_05 AC 26 ms
8,988 KB
testcase_06 AC 26 ms
9,000 KB
testcase_07 AC 26 ms
8,912 KB
testcase_08 AC 26 ms
8,988 KB
testcase_09 AC 26 ms
8,968 KB
testcase_10 AC 26 ms
9,008 KB
testcase_11 AC 26 ms
8,924 KB
testcase_12 AC 30 ms
8,944 KB
testcase_13 AC 25 ms
9,008 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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