結果

問題 No.273 回文分解
ユーザー mlihua09mlihua09
提出日時 2020-09-01 17:00:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 2,564 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 76,044 KB
最終ジャッジ日時 2023-08-12 08:18:12
合計ジャッジ時間 6,640 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,336 KB
testcase_01 AC 68 ms
71,584 KB
testcase_02 AC 68 ms
71,304 KB
testcase_03 AC 69 ms
71,208 KB
testcase_04 AC 67 ms
71,128 KB
testcase_05 AC 68 ms
71,192 KB
testcase_06 AC 68 ms
71,440 KB
testcase_07 AC 66 ms
71,496 KB
testcase_08 AC 68 ms
71,272 KB
testcase_09 AC 68 ms
71,352 KB
testcase_10 AC 68 ms
71,332 KB
testcase_11 AC 66 ms
71,504 KB
testcase_12 AC 67 ms
71,388 KB
testcase_13 AC 66 ms
71,352 KB
testcase_14 AC 72 ms
76,004 KB
testcase_15 AC 69 ms
71,096 KB
testcase_16 AC 69 ms
71,244 KB
testcase_17 AC 71 ms
71,284 KB
testcase_18 AC 70 ms
71,376 KB
testcase_19 AC 69 ms
71,328 KB
testcase_20 AC 69 ms
71,092 KB
testcase_21 AC 68 ms
71,624 KB
testcase_22 AC 73 ms
75,652 KB
testcase_23 AC 73 ms
75,844 KB
testcase_24 AC 73 ms
75,988 KB
testcase_25 AC 74 ms
75,896 KB
testcase_26 AC 75 ms
75,856 KB
testcase_27 AC 74 ms
76,044 KB
testcase_28 AC 75 ms
75,992 KB
testcase_29 AC 70 ms
71,132 KB
testcase_30 AC 72 ms
75,660 KB
testcase_31 AC 69 ms
71,564 KB
testcase_32 AC 68 ms
71,240 KB
testcase_33 AC 70 ms
71,268 KB
testcase_34 AC 68 ms
71,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #



S = input()

ans = 1

n = len(S)

for i in range(n + 1):
    for j in range(i):
        
        T = S[j:i]
        if T == T[::-1] and i - j != n:
            ans = max(ans, i - j)
            
print(ans)
0