結果

問題 No.1617 Palindrome Removal
ユーザー hayatroidhayatroid
提出日時 2021-07-22 21:28:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 110 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 10,616 KB
実行使用メモリ 9,980 KB
最終ジャッジ日時 2023-09-24 15:39:38
合計ジャッジ時間 1,898 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,828 KB
testcase_01 AC 29 ms
9,844 KB
testcase_02 AC 28 ms
9,808 KB
testcase_03 AC 27 ms
9,832 KB
testcase_04 AC 30 ms
9,980 KB
testcase_05 AC 25 ms
9,548 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 29 ms
9,740 KB
testcase_11 AC 26 ms
9,716 KB
testcase_12 AC 32 ms
9,864 KB
testcase_13 AC 30 ms
9,836 KB
testcase_14 AC 15 ms
7,804 KB
testcase_15 WA -
testcase_16 AC 15 ms
7,896 KB
testcase_17 AC 14 ms
7,808 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 15 ms
7,848 KB
testcase_21 AC 16 ms
7,912 KB
testcase_22 AC 16 ms
7,896 KB
testcase_23 AC 15 ms
7,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input().rstrip()
if len(set(s))>1:
    print(len(s)-2)
elif len(s)%2==0:
    print(0)
else:
    print(-1)
0