結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
9,800 KB
testcase_01 AC 31 ms
9,884 KB
testcase_02 AC 31 ms
9,884 KB
testcase_03 AC 31 ms
9,744 KB
testcase_04 AC 32 ms
9,932 KB
testcase_05 AC 28 ms
9,432 KB
testcase_06 AC 20 ms
9,848 KB
testcase_07 AC 19 ms
9,120 KB
testcase_08 AC 15 ms
7,916 KB
testcase_09 AC 16 ms
7,796 KB
testcase_10 AC 30 ms
9,876 KB
testcase_11 AC 30 ms
9,616 KB
testcase_12 AC 32 ms
9,864 KB
testcase_13 AC 33 ms
10,000 KB
testcase_14 AC 15 ms
7,796 KB
testcase_15 AC 16 ms
7,820 KB
testcase_16 AC 15 ms
7,808 KB
testcase_17 AC 16 ms
7,780 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 16 ms
7,860 KB
testcase_21 AC 15 ms
7,848 KB
testcase_22 AC 16 ms
7,852 KB
testcase_23 AC 15 ms
7,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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