結果

問題 No.29 パワーアップ
ユーザー k0825
提出日時 2019-03-05 15:13:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 276 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-23 14:23:22
合計ジャッジ時間 1,598 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
ans=0
items,x=[],[]
for _ in '1'*int(input()): 
	items.extend(list(map(int, input().split())))
for [i, j] in Counter(items).most_common():
	if j > 1:
		ans += int(j/2)
		if j%2: x.append(j%2)
	else:
		x.append(i)
ans += int(len(x)/4)
print(ans)
0