結果

問題 No.29 パワーアップ
コンテスト
ユーザー gorugo30
提出日時 2021-02-22 19:57:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 36 ms / 5,000 ms
コード長 255 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,296 KB
実行使用メモリ 54,048 KB
最終ジャッジ日時 2025-10-24 21:16:55
合計ジャッジ時間 1,644 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
cnt = [0] * 11
for i in range(N):
    items = list(map(int, input().split()))
    for j in range(3):
        cnt[items[j]] += 1
ans = 0
res = 0
for i in range(1, 11):
    ans += cnt[i] // 2
    res += cnt[i] % 2
ans += res // 4
print(ans)
0