結果

問題 No.1617 Palindrome Removal
ユーザー mrngmrng
提出日時 2021-12-12 20:53:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 142 bytes
コンパイル時間 678 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 103,304 KB
最終ジャッジ日時 2023-09-28 14:15:17
合計ジャッジ時間 5,326 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
100,656 KB
testcase_01 AC 126 ms
101,360 KB
testcase_02 AC 132 ms
102,500 KB
testcase_03 AC 130 ms
102,192 KB
testcase_04 AC 135 ms
103,304 KB
testcase_05 AC 126 ms
100,140 KB
testcase_06 AC 144 ms
103,116 KB
testcase_07 AC 122 ms
97,004 KB
testcase_08 AC 74 ms
71,316 KB
testcase_09 AC 75 ms
71,160 KB
testcase_10 AC 139 ms
102,072 KB
testcase_11 AC 135 ms
100,208 KB
testcase_12 AC 140 ms
103,296 KB
testcase_13 AC 138 ms
103,244 KB
testcase_14 AC 74 ms
71,416 KB
testcase_15 AC 75 ms
71,136 KB
testcase_16 AC 73 ms
71,020 KB
testcase_17 AC 74 ms
70,976 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 76 ms
71,252 KB
testcase_21 AC 74 ms
71,212 KB
testcase_22 AC 75 ms
71,124 KB
testcase_23 AC 75 ms
71,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
if len(set(list(s)))==1:
	if len(s)%2==0: print(0)
	else: print(-1)
else:
	if s==s[::-1]:
		print(len(s)-2)
	else:
		print(len(s))
0