結果
問題 |
No.193 筒の数式
|
ユーザー |
![]() |
提出日時 | 2018-08-26 15:34:40 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 426 bytes |
コンパイル時間 | 115 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-01 03:56:39 |
合計ジャッジ時間 | 1,497 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 RE * 2 |
ソースコード
def strip_lzero(s): if s[0] != "0": return s for i, c in enumerate(s): if c != 0: return s[i+1:] S = input() max_v = -1000000000000 for i in range(len(S)): s = S[i:] + S[:i] if s[0] == "+" or s[0] == "-" or s[len(S)-1] == "+" or s[len(S)-1] == "-": continue else: s = strip_lzero(s) v = eval(s) if max_v < v: max_v = v print(max_v)