JavaScript (Node.js), 64 bytes
c=>a=>[,7.77,a.sort()[1]-a[2]?2:3,1,.1][new Set(a).size]+c/100|0size]+c*.01|0
I figurefigured there hashad to be at least one JSJavaScript answer to an Arnauld challenge.!
The concept here is mainly to use the number of distinct elements as a lookup key:.
- 1 unique => 4 of a kind
- 2 unique => 2 pair or 3 of a kind
- 3 unique => 1 pair
- 4 unique => nothingno matches
In order to distinguish between 2 pair and 3 of a kind, the input array is sorted and the middle 2 elements are compared.