結果

問題 No.29 パワーアップ
ユーザー U S
提出日時 2020-03-11 22:31:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 227 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-16 01:07:38
合計ジャッジ時間 1,659 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = [0] * 10
for i in range(n):
    b,c,d = map(int,input().split())
    a[b-1] += 1
    a[c-1] += 1
    a[d-1] += 1
ans = 0
for i in range(10):
    ans += a[i] // 2
    a[i] %= 2
ans += sum(a) // 4
print(ans)
0