結果

問題 No.1617 Palindrome Removal
ユーザー hayatroid
提出日時 2021-07-22 21:31:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 145 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 13,248 KB
最終ジャッジ日時 2024-07-17 16:37:53
合計ジャッジ時間 2,132 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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