結果

問題 No.193 筒の数式
ユーザー e-mon
提出日時 2015-04-29 21:43:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-05 16:48:24
合計ジャッジ時間 1,334 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
# -*- coding: utf-8 -*-

S = input()
ans = -10**10
for i in range(len(S)):
    e = S[i+1:] + S[:i+1]
    if e[0] in  ['+','-'] or e[-1] in ['+','-']:
        continue
    print('before :',e)
    e = ''.join([str(int(s)) if s.isdigit() is True else s for s in ''.join([' ' + x + ' ' if x in ['+','-'] else x for x in e]).split()])
    print(e)

    ans = max(ans,eval(e))
print(ans)
0