結果

問題 No.588 空白と回文
ユーザー lloyz
提出日時 2022-08-28 09:41:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 221 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 81,880 KB
実行使用メモリ 69,384 KB
最終ジャッジ日時 2024-10-15 08:40:31
合計ジャッジ時間 2,181 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()

n = len(S)
ans = 1
for i in range(n):
    j = 0
    res = 1
    while i - j - 1 >= 0 and i + j + 1 < n:
        j += 1
        if S[i - j] == S[i + j]:
            res += 2
    ans = max(ans, res)
print(ans)
0