結果

問題 No.2851 Make Pairs
ユーザー toshiro_yanagi
提出日時 2025-04-01 21:34:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 251 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 37,260 KB
最終ジャッジ日時 2025-04-01 21:34:54
合計ジャッジ時間 1,991 ms
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict


def fun(a):
    dic = defaultdict(int)
    for ai in a:
        dic[ai] += 1
    res = 0
    for v in dic.values():
        res += v // 2
    return res


_ = input()
print(fun([int(x) for x in input().split()]))
0