結果
| 問題 |
No.273 回文分解
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-06 17:37:04 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 2,000 ms |
| コード長 | 239 bytes |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-25 13:28:51 |
| 合計ジャッジ時間 | 1,471 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
#!/usr/bin/python
s = raw_input()
n = len(s)
res = 0
for i in xrange(n):
for j in xrange(i, n):
if i==0 and j==n-1:
continue
t = s[i:j+1]
if t == t[::-1]:
res = max(res, j-i+1)
print res