結果

問題 No.588 空白と回文
ユーザー lloyzlloyz
提出日時 2022-08-28 09:41:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 221 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 82,196 KB
実行使用メモリ 69,388 KB
最終ジャッジ日時 2024-04-23 08:45:46
合計ジャッジ時間 2,106 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,628 KB
testcase_01 AC 38 ms
52,568 KB
testcase_02 AC 38 ms
52,096 KB
testcase_03 WA -
testcase_04 AC 38 ms
52,096 KB
testcase_05 AC 38 ms
53,348 KB
testcase_06 AC 41 ms
57,908 KB
testcase_07 AC 38 ms
52,232 KB
testcase_08 AC 40 ms
52,836 KB
testcase_09 AC 37 ms
52,864 KB
testcase_10 AC 36 ms
52,404 KB
testcase_11 WA -
testcase_12 AC 45 ms
67,256 KB
testcase_13 WA -
testcase_14 AC 35 ms
53,552 KB
testcase_15 WA -
testcase_16 AC 38 ms
52,884 KB
testcase_17 AC 47 ms
65,268 KB
testcase_18 AC 38 ms
53,792 KB
testcase_19 AC 38 ms
52,584 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

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