結果

問題 No.2204 Palindrome Splitting (No Rearrangement ver.)
ユーザー Mat_h
提出日時 2023-02-03 22:27:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-02 20:31:33
合計ジャッジ時間 2,088 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 4 WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    # print(*answers, sep=os.linesep)
    from collections import Counter
    
    c = Counter(input())
    
    s = sum(c.values())
    n = len(list(filter(lambda v: v % 2 == 1, c.values())))
    
    if n == 0:
      print(s)
    else:
      t = ((s-n) /2)//n
    
      print(int(1+t*2))

    
main()

0