結果
問題 |
No.1617 Palindrome Removal
|
ユーザー |
|
提出日時 | 2021-07-23 17:09:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 230 bytes |
コンパイル時間 | 1,362 ms |
コンパイル使用メモリ | 82,184 KB |
実行使用メモリ | 124,816 KB |
最終ジャッジ日時 | 2024-07-18 12:14:59 |
合計ジャッジ時間 | 4,390 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 WA * 7 |
ソースコード
from collections import Counter S = str(input()) N = len(S) if len(S) == 1: print(-1) exit() ls = list(S) cs = Counter(ls) if len(cs) == 1: print(0) else: if S[:N//2] != S[N-1:N//2:-1]: print(N) else: print(N-2)