結果

問題 No.193 筒の数式
ユーザー 12354865271235486527
提出日時 2020-01-14 11:11:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 26 ms / 1,000 ms
コード長 240 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,484 KB
実行使用メモリ 9,088 KB
最終ジャッジ日時 2023-08-26 00:37:19
合計ジャッジ時間 1,627 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
8,920 KB
testcase_01 AC 25 ms
8,908 KB
testcase_02 AC 24 ms
8,964 KB
testcase_03 AC 23 ms
9,088 KB
testcase_04 AC 20 ms
8,904 KB
testcase_05 AC 21 ms
8,904 KB
testcase_06 AC 23 ms
8,932 KB
testcase_07 AC 23 ms
8,952 KB
testcase_08 AC 25 ms
9,056 KB
testcase_09 AC 23 ms
8,932 KB
testcase_10 AC 22 ms
8,932 KB
testcase_11 AC 22 ms
9,004 KB
testcase_12 AC 22 ms
9,072 KB
testcase_13 AC 22 ms
8,904 KB
testcase_14 AC 26 ms
8,980 KB
testcase_15 AC 22 ms
8,908 KB
testcase_16 AC 21 ms
8,988 KB
testcase_17 AC 22 ms
8,940 KB
testcase_18 AC 22 ms
8,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
S = input()
D = set(map(str, range(10)))
ans = -float('inf')
for i in range(len(S)):
    A = S[i:] + S[:i]
    if not A[0] in D or not A[-1] in D:
        continue
    ans = max(ans, eval(re.sub(r'\b0+(?!\b)', '', A)))
print(ans)
0