結果
問題 |
No.193 筒の数式
|
ユーザー |
|
提出日時 | 2020-05-07 10:28:31 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 1,000 ms |
コード長 | 398 bytes |
コンパイル時間 | 131 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-03 09:20:47 |
合計ジャッジ時間 | 1,297 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
import re def rotate(str1: str, n: int): return str1[n:] + str1[:n] def is_stem(stem: str): return not re.match(r'^[^+-].*[^+-]$', stem) is None def solve(str1: str): return max(([eval(stem) for stem in ( [re.sub(r'0+(\d+)', r'\1', rotation) for rotation in ([rotate(str1, i) for i in range(0, len(str1))]) if is_stem(rotation)])])) s = input() print(solve(s))