結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,068 KB
testcase_01 AC 27 ms
8,944 KB
testcase_02 AC 25 ms
8,976 KB
testcase_03 AC 25 ms
8,924 KB
testcase_04 AC 26 ms
8,928 KB
testcase_05 AC 25 ms
9,044 KB
testcase_06 AC 25 ms
8,936 KB
testcase_07 AC 25 ms
9,060 KB
testcase_08 AC 25 ms
8,924 KB
testcase_09 AC 26 ms
9,060 KB
testcase_10 AC 25 ms
9,048 KB
testcase_11 AC 25 ms
9,052 KB
testcase_12 AC 26 ms
9,048 KB
testcase_13 AC 26 ms
8,992 KB
testcase_14 AC 25 ms
9,080 KB
testcase_15 AC 25 ms
8,916 KB
testcase_16 AC 26 ms
9,048 KB
testcase_17 AC 25 ms
8,984 KB
testcase_18 AC 25 ms
8,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
S = str(input())
ans = -1 * 10 ** 11
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