結果
問題 | No.273 回文分解 |
ユーザー |
|
提出日時 | 2015-08-28 23:51:32 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 216 bytes |
コンパイル時間 | 52 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 13:25:37 |
合計ジャッジ時間 | 1,464 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
S = raw_input()N = len(S)mx = 1for i in xrange(N):for j in xrange(i + 1, N + 1):if j - i < N:str = S[i:j]if str == str[::-1]:mx = max(mx, j - i)print mx