結果
| 問題 | No.1617 Palindrome Removal |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2021-07-22 21:26:01 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 117 bytes |
| 記録 | |
| コンパイル時間 | 370 ms |
| コンパイル使用メモリ | 85,456 KB |
| 実行使用メモリ | 106,240 KB |
| 最終ジャッジ日時 | 2026-04-01 07:24:03 |
| 合計ジャッジ時間 | 2,340 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
Kude