結果
問題 | No.193 筒の数式 |
ユーザー | beet |
提出日時 | 2018-08-09 13:54:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 1,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 252 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-09-23 04:21:08 |
合計ジャッジ時間 | 1,513 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
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)