結果

問題 No.273 回文分解
ユーザー 👑 H20H20
提出日時 2021-01-22 10:26:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 173 bytes
コンパイル時間 1,128 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 76,388 KB
最終ジャッジ日時 2023-08-27 00:45:45
合計ジャッジ時間 5,022 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,316 KB
testcase_01 AC 66 ms
71,196 KB
testcase_02 AC 66 ms
71,280 KB
testcase_03 AC 65 ms
71,024 KB
testcase_04 AC 68 ms
71,504 KB
testcase_05 AC 69 ms
71,060 KB
testcase_06 AC 66 ms
71,328 KB
testcase_07 AC 66 ms
71,204 KB
testcase_08 AC 68 ms
71,332 KB
testcase_09 AC 73 ms
71,432 KB
testcase_10 AC 66 ms
71,172 KB
testcase_11 AC 67 ms
71,208 KB
testcase_12 AC 68 ms
71,484 KB
testcase_13 AC 70 ms
71,432 KB
testcase_14 AC 72 ms
76,388 KB
testcase_15 AC 68 ms
71,384 KB
testcase_16 AC 68 ms
71,200 KB
testcase_17 AC 67 ms
71,192 KB
testcase_18 AC 66 ms
71,276 KB
testcase_19 AC 66 ms
71,364 KB
testcase_20 AC 64 ms
71,264 KB
testcase_21 AC 66 ms
71,304 KB
testcase_22 AC 71 ms
75,936 KB
testcase_23 AC 70 ms
75,976 KB
testcase_24 AC 77 ms
76,016 KB
testcase_25 AC 77 ms
76,080 KB
testcase_26 AC 77 ms
76,044 KB
testcase_27 AC 77 ms
75,724 KB
testcase_28 AC 74 ms
76,000 KB
testcase_29 AC 70 ms
71,196 KB
testcase_30 AC 72 ms
75,988 KB
testcase_31 AC 64 ms
71,200 KB
testcase_32 AC 70 ms
71,364 KB
testcase_33 AC 73 ms
71,528 KB
testcase_34 AC 70 ms
71,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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