結果

問題 No.1617 Palindrome Removal
ユーザー soraie_soraie_
提出日時 2021-07-23 13:06:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 126 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,528 KB
実行使用メモリ 10,692 KB
最終ジャッジ日時 2023-09-25 11:21:36
合計ジャッジ時間 3,824 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 20 ms
10,572 KB
testcase_02 AC 22 ms
10,564 KB
testcase_03 AC 21 ms
10,528 KB
testcase_04 AC 21 ms
10,572 KB
testcase_05 AC 20 ms
10,128 KB
testcase_06 AC 21 ms
10,536 KB
testcase_07 AC 19 ms
9,792 KB
testcase_08 AC 15 ms
7,820 KB
testcase_09 AC 15 ms
7,788 KB
testcase_10 AC 25 ms
10,488 KB
testcase_11 AC 20 ms
10,128 KB
testcase_12 AC 22 ms
10,568 KB
testcase_13 AC 21 ms
10,484 KB
testcase_14 AC 15 ms
7,828 KB
testcase_15 AC 15 ms
7,776 KB
testcase_16 AC 16 ms
7,804 KB
testcase_17 AC 16 ms
7,888 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 15 ms
7,744 KB
testcase_21 AC 15 ms
7,748 KB
testcase_22 WA -
testcase_23 AC 15 ms
7,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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