結果

問題 No.29 パワーアップ
ユーザー kutsutama
提出日時 2018-03-27 12:46:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 330 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-25 12:42:22
合計ジャッジ時間 1,802 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
res = 0
dic = {}
for i in range(n):
  abc = [int(x) for x in input().split()]
  for key in abc:
    if key in dic:
      dic[key] += 1
    else:
      dic[key] = 1
    
    if dic[key] == 2:
      res += 1
      dic[key] -= 2

cnt = 0
for k,v in dic.items():
  if v >= 1:
    cnt += 1
res += cnt // 4

print(res)
0