結果

問題 No.193 筒の数式
コンテスト
ユーザー beet
提出日時 2018-08-09 13:54:06
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 93 ms / 1,000 ms
+ 539µs
コード長 327 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 289 ms
コンパイル使用メモリ 21,468 KB
実行使用メモリ 15,788 KB
最終ジャッジ日時 2026-09-02 23:00:27
合計ジャッジ時間 3,467 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import re
s = input()
ans = -10 ** 10
if s[0].isdigit() and s[-1].isdigit():
    ans = eval(re.sub(r'\b0+(?!\b)', '', s))

for i in range(len(s)):
    if i == 0: continue;
    if s[i-1].isdigit() and s[i].isdigit():
        res = eval(re.sub(r'\b0+(?!\b)', '', s[i:]+s[:i]))
        if ans < res: ans = res;        
print(ans)
0