結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 29 ms
9,896 KB
testcase_02 AC 29 ms
9,892 KB
testcase_03 AC 29 ms
9,668 KB
testcase_04 AC 30 ms
9,816 KB
testcase_05 AC 27 ms
9,420 KB
testcase_06 AC 19 ms
9,892 KB
testcase_07 AC 18 ms
9,080 KB
testcase_08 AC 15 ms
7,808 KB
testcase_09 AC 15 ms
7,812 KB
testcase_10 AC 31 ms
9,804 KB
testcase_11 AC 29 ms
9,608 KB
testcase_12 AC 32 ms
9,800 KB
testcase_13 AC 32 ms
9,932 KB
testcase_14 AC 15 ms
7,748 KB
testcase_15 AC 15 ms
7,764 KB
testcase_16 AC 14 ms
7,836 KB
testcase_17 AC 16 ms
7,912 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 15 ms
7,924 KB
testcase_21 AC 15 ms
7,864 KB
testcase_22 WA -
testcase_23 AC 16 ms
7,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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