結果
問題 |
No.1617 Palindrome Removal
|
ユーザー |
![]() |
提出日時 | 2021-07-22 21:26:01 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 117 bytes |
コンパイル時間 | 258 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 96,684 KB |
最終ジャッジ日時 | 2024-07-17 16:17:21 |
合計ジャッジ時間 | 3,246 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 18 WA * 2 |
ソースコード
s = input() n = len(s) ans = n if s != s[::-1] else n - 2 if len(set(s)) >= 2 else 0 if n % 2 == 0 else -1 print(ans)