結果
| 問題 | 
                            No.193 筒の数式
                             | 
                    
| コンテスト | |
| ユーザー | 
                             fmhr
                         | 
                    
| 提出日時 | 2015-04-27 00:28:25 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 275 bytes | 
| コンパイル時間 | 186 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,624 KB | 
| 最終ジャッジ日時 | 2024-07-05 03:19:12 | 
| 合計ジャッジ時間 | 2,459 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 3 | 
| other | WA * 14 RE * 2 | 
ソースコード
import re
S = str(input())
ans = eval(S)
for i in range(1, len(S)):
    s = S[i:]+S[:i]
    s = re.sub(r'\b0+(?!\b)', '', s)
    print(s)
    if s[0] in '+-' or s[len(s)-1] in '+-':
        continue
    try:
        ans = max(ans, eval(s))
    except:
        pass
print(ans)
            
            
            
        
            
fmhr