結果
問題 | No.29 パワーアップ |
ユーザー |
|
提出日時 | 2021-08-22 21:15:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-06 20:17:18 |
合計ジャッジ時間 | 1,751 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
n=int(input()) lst=[0]*(11) ans=0 for _ in range(n): a,b,c=map(int,input().split()) lst[a]+=1 lst[b]+=1 lst[c]+=1 # print(lst) for i in range(1,11): if lst[i]>=2: tmp=lst[i]//2 ans+=tmp lst[i]-=(tmp*2) tmp1=0 # print(lst,ans) # print(lst) for j in range(1,11): if lst[j]==1: tmp1+=1 # print(tmp1) # print(tmp1) ans+=(tmp1//4) print(ans)