結果

問題 No.29 パワーアップ
コンテスト
ユーザー tarotaro789
提出日時 2017-10-27 17:16:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 266 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2025-10-24 21:03:30
合計ジャッジ時間 1,362 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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