結果

問題 No.1617 Palindrome Removal
ユーザー kozykozy
提出日時 2021-07-22 21:34:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 185 bytes
コンパイル時間 725 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 9,952 KB
最終ジャッジ日時 2023-09-24 15:57:32
合計ジャッジ時間 5,461 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 295 ms
9,688 KB
testcase_01 AC 317 ms
9,864 KB
testcase_02 AC 301 ms
9,808 KB
testcase_03 AC 298 ms
9,688 KB
testcase_04 AC 313 ms
9,952 KB
testcase_05 AC 264 ms
9,372 KB
testcase_06 AC 18 ms
9,772 KB
testcase_07 AC 16 ms
9,068 KB
testcase_08 AC 14 ms
7,932 KB
testcase_09 AC 14 ms
7,944 KB
testcase_10 AC 296 ms
9,740 KB
testcase_11 AC 256 ms
9,660 KB
testcase_12 AC 315 ms
9,816 KB
testcase_13 AC 310 ms
9,800 KB
testcase_14 AC 16 ms
7,796 KB
testcase_15 AC 15 ms
8,000 KB
testcase_16 AC 15 ms
7,944 KB
testcase_17 AC 15 ms
7,980 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 16 ms
7,876 KB
testcase_21 AC 16 ms
7,860 KB
testcase_22 AC 16 ms
7,872 KB
testcase_23 AC 16 ms
7,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
for i in range(len(S)):
  if S[i]!=S[len(S)-i-1]:
    print(len(S))
    exit()
if S==S[0]*len(S):
  if len(S)%2==0:
    print(0)
  else:
    print(-1)
  exit()
print(len(S)-2)
0