結果

問題 No.1617 Palindrome Removal
ユーザー convexineqconvexineq
提出日時 2021-07-22 22:56:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 113 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 79,628 KB
最終ジャッジ日時 2023-09-24 18:39:28
合計ジャッジ時間 3,667 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
79,412 KB
testcase_01 AC 111 ms
79,628 KB
testcase_02 AC 101 ms
79,328 KB
testcase_03 AC 100 ms
79,364 KB
testcase_04 AC 88 ms
75,148 KB
testcase_05 AC 84 ms
74,296 KB
testcase_06 AC 84 ms
74,888 KB
testcase_07 AC 80 ms
73,480 KB
testcase_08 AC 73 ms
71,236 KB
testcase_09 AC 72 ms
71,368 KB
testcase_10 AC 87 ms
74,608 KB
testcase_11 AC 85 ms
74,164 KB
testcase_12 AC 92 ms
74,872 KB
testcase_13 AC 86 ms
74,856 KB
testcase_14 AC 74 ms
71,180 KB
testcase_15 AC 71 ms
71,156 KB
testcase_16 AC 72 ms
71,192 KB
testcase_17 AC 74 ms
71,112 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 75 ms
71,232 KB
testcase_21 AC 74 ms
71,424 KB
testcase_22 AC 74 ms
71,280 KB
testcase_23 AC 73 ms
71,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
print(len(s) if s != s[::-1] else len(s)-2 if any(si != s[0] for si in s) else -1 if len(s)%2 else 0)
0