結果
問題 | No.273 回文分解 |
ユーザー |
|
提出日時 | 2018-12-04 16:12:59 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 211 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-07 15:19:26 |
合計ジャッジ時間 | 2,244 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
s = input()ans = 0for i in range(len(s)):for j in range(i+1, len(s)+1):l1 = s[i:j]l2 = l1[::-1]if l1 == l2 and len(l1) != len(s):ans = max(ans, len(l1))print(ans)