結果

問題 No.588 空白と回文
ユーザー 12354865271235486527
提出日時 2020-01-18 21:17:36
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 498 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-09-10 17:37:31
合計ジャッジ時間 3,145 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,824 KB
testcase_01 AC 16 ms
7,816 KB
testcase_02 AC 16 ms
7,896 KB
testcase_03 WA -
testcase_04 AC 16 ms
7,768 KB
testcase_05 AC 16 ms
7,828 KB
testcase_06 AC 16 ms
7,932 KB
testcase_07 AC 16 ms
7,784 KB
testcase_08 AC 16 ms
7,764 KB
testcase_09 AC 17 ms
7,748 KB
testcase_10 AC 16 ms
7,768 KB
testcase_11 WA -
testcase_12 AC 137 ms
7,900 KB
testcase_13 WA -
testcase_14 AC 16 ms
7,756 KB
testcase_15 WA -
testcase_16 AC 16 ms
7,768 KB
testcase_17 AC 97 ms
7,880 KB
testcase_18 AC 17 ms
7,756 KB
testcase_19 AC 16 ms
7,884 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
len_S = len(S)
ans = 0
for i in range(len_S):
    t = 1
    for j in range(1, len_S):
        if i - j < 0 or i + j > len_S - 1:
            break
        if S[i-j] == S[i+j]:
            t += 2
    ans = max(ans, t)
print(ans)
0