結果

問題 No.29 パワーアップ
ユーザー Ohnuma
提出日時 2020-04-08 20:49:57
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 287 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-19 05:43:16
合計ジャッジ時間 1,383 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n = int(input())
S = []
for _ in range(n):
    a,b,c = map(int,input().split())
    S.append(a)
    S.append(b)
    S.append(c)
ctr = Counter(S)
ret = 0
tank = 0
for k,v in ctr.items():
    if v>=2:
        ret += v//2
    tank += v%2
print(ret + tank//4)
0