結果
問題 | No.273 回文分解 |
ユーザー | tnoda_ |
提出日時 | 2015-08-28 23:35:39 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 136 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 13:25:27 |
合計ジャッジ時間 | 1,542 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
def is_palindrome(s): L = len(s) for i in range(L/2): if s[i] != s[L-i-1]: return False return True S = raw_input() L = len(S) for i in range(L-1, 0, -1): for j in range(L-i+1): if is_palindrome(S[j:j+i]): print(i) quit()