結果
問題 |
No.1617 Palindrome Removal
|
ユーザー |
|
提出日時 | 2021-08-06 15:48:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 52 ms / 2,000 ms |
コード長 | 173 bytes |
コンパイル時間 | 247 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 13,312 KB |
最終ジャッジ日時 | 2024-09-17 00:29:37 |
合計ジャッジ時間 | 2,748 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
#yuki1617 s=input() if len(set(s))==1: if len(s)%2: print(-1) else: print(0) elif s!=s[::-1]: print(len(s)) else: if len(s)!=3: print(len(s)-2) else: print(-1)