結果
| 問題 |
No.273 回文分解
|
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2016-05-11 22:59:08 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 2,000 ms |
| コード長 | 343 bytes |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-25 13:36:33 |
| 合計ジャッジ時間 | 1,439 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
S=raw_input()
ans=0
for i in range(len(S)):
for j in range(i,len(S)):
if i==0 and j==len(S)-1:
continue
I,J=i,j
ok=True
while I<J:
if S[I]!=S[J]:
ok=False
break
I+=1
J-=1
if ok:
ans=max(ans,j-i+1)
print ans
yaoshimax