結果
| 問題 | No.1617 Palindrome Removal |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-23 17:25:03 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 340 bytes |
| 記録 | |
| コンパイル時間 | 260 ms |
| コンパイル使用メモリ | 85,044 KB |
| 実行使用メモリ | 186,228 KB |
| 最終ジャッジ日時 | 2026-04-02 05:09:40 |
| 合計ジャッジ時間 | 3,505 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 3 WA * 17 |
ソースコード
from collections import Counter
S = str(input())
N = len(S)
if N == 1:
print(-1)
exit()
ls = list(S)
cs = Counter(ls)
if len(cs) == 1:
if N%2 == 0:
print(0)
else:
print(-1)
else:
print(S[:N//2],S[N-1:N//2:-1])
if S[:N//2] != S[N-1:N//2:-1]:
print(N)
else:
if N == 3:
print(-1)
else:
print(N-2)