結果
| 問題 | 
                            No.193 筒の数式
                             | 
                    
| コンテスト | |
| ユーザー | 
                             fmhr
                         | 
                    
| 提出日時 | 2015-04-27 00:53:38 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 259 bytes | 
| コンパイル時間 | 78 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-07-05 03:23:58 | 
| 合計ジャッジ時間 | 1,322 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 11 WA * 5 | 
ソースコード
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)
            
            
            
        
            
fmhr