結果

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

ソースコード

diff #

n=int(input())
cnt=[0]*11
for _ in range(n):
    a,b,c=map(int,input().split())
    cnt[a]+=1;cnt[b]+=1;cnt[c]+=1
x=0;y=0
for i in range(11):
    x+=cnt[i]>>1
    y+=cnt[i]&1
print(x+y//4)
0