結果

問題 No.29 パワーアップ
ユーザー tarotaro789
提出日時 2017-10-27 17:16:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 5,000 ms
コード長 266 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-11-21 21:20:28
合計ジャッジ時間 1,646 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

    #inp
n=int(input())
items=[]
up=0

for _ in range(n):
    items+=input().split()

#exe
dic_items=Counter(items)

for (i,j) in dic_items.items():
    up+=j//2
    dic_items[i]=j%2

up+=sum(list(dic_items.values())) //4

print(up)
0