結果

問題 No.29 パワーアップ
ユーザー yoza
提出日時 2014-11-22 14:22:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 292 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-01-02 20:07:14
合計ジャッジ時間 2,112 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

n = int(input())
count = Counter()

for i in range(n):
    for j in input().split():
        count[j] += 1

result = sum(map(lambda c: c[1] // 2, count.most_common()))
result += sum(map(lambda c: c[1] % 2, count.most_common())) // 4
print(result)
0