結果

問題 No.1617 Palindrome Removal
ユーザー harurunharurun
提出日時 2021-07-22 21:44:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 154 bytes
コンパイル時間 828 ms
コンパイル使用メモリ 10,448 KB
実行使用メモリ 9,892 KB
最終ジャッジ日時 2023-09-24 16:18:37
合計ジャッジ時間 5,370 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 243 ms
9,728 KB
testcase_01 WA -
testcase_02 AC 242 ms
9,796 KB
testcase_03 AC 249 ms
9,664 KB
testcase_04 AC 251 ms
9,808 KB
testcase_05 AC 205 ms
9,568 KB
testcase_06 AC 279 ms
9,848 KB
testcase_07 AC 176 ms
9,120 KB
testcase_08 AC 15 ms
7,780 KB
testcase_09 AC 16 ms
7,772 KB
testcase_10 AC 234 ms
9,700 KB
testcase_11 AC 206 ms
9,628 KB
testcase_12 AC 251 ms
9,892 KB
testcase_13 AC 249 ms
9,844 KB
testcase_14 AC 16 ms
7,784 KB
testcase_15 AC 15 ms
7,800 KB
testcase_16 WA -
testcase_17 AC 15 ms
7,756 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 16 ms
7,784 KB
testcase_21 AC 16 ms
7,784 KB
testcase_22 AC 16 ms
7,776 KB
testcase_23 AC 15 ms
7,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
b=True
for i in range(len(s)):
  if s[i]!=s[-i-1]:
    b=False
if s[0]*len(s)==s:
  print(-1)
elif b:
  print(len(s)-2)
else:
  print(len(s))
  
0