結果

問題 No.1617 Palindrome Removal
ユーザー 👑 rin204rin204
提出日時 2022-01-18 02:49:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 157 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 97,024 KB
最終ジャッジ日時 2024-05-02 19:13:04
合計ジャッジ時間 3,404 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
96,000 KB
testcase_01 AC 100 ms
96,512 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 50 ms
58,496 KB
testcase_07 AC 43 ms
55,808 KB
testcase_08 AC 33 ms
51,456 KB
testcase_09 AC 33 ms
51,456 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 33 ms
51,584 KB
testcase_16 AC 32 ms
51,712 KB
testcase_17 AC 33 ms
51,712 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 33 ms
51,456 KB
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
if S != S[::-1]:
    print(len(S))
elif len(set(S)) == 1:
    if len(S) % 2 == 1:
        print(-1)
    else:
        print(0)
else:
    print(2)
0