結果
| 問題 | No.193 筒の数式 |
| コンテスト | |
| ユーザー |
tkzw_21
|
| 提出日時 | 2015-04-26 22:33:11 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 487 bytes |
| 記録 | |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 77,728 KB |
| 最終ジャッジ日時 | 2025-12-03 14:48:26 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 1 |
ソースコード
s = raw_input() n = len(s) ret = -1000000000000 f = True if s[0] == '+' or s[0] == '-': f = False for j in range(0,len(s)-1): if not s[j].isdigit() and not s[j+1].isdigit(): f = False if f: ret = eval(s) for i in range(1,n): t = str(s[-i:] + s[:n-i]) # print t if not t[0].isdigit() or not t[-1].isdigit(): continue f = True for j in range(0,len(t)-1): if not t[j].isdigit() and not t[j+1].isdigit(): f = False if f: # print t ret = max(ret,eval(t)) print ret
tkzw_21