結果

問題 No.1617 Palindrome Removal
ユーザー rin204
提出日時 2022-01-18 02:49:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 157 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 96,768 KB
最終ジャッジ日時 2024-11-23 13:11:38
合計ジャッジ時間 3,460 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 7 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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