URBVSNAZHRYLFVYBHFB5OVECROLV4T54R3CTITJLMMTC3QWKVQKAC
func fullHouse(dices []int) int {
values := map[int]int{}
var ret int
for _, d := range dices {
values[d] += 1
ret += d
}
if len(values) == 2 {
for _, v := range values {
if v == 3 {
return ret
}
}
}
return 0
}
func fourOfAKind(dices []int) int {
values := map[int]int{}
for _, d := range dices {
values[d] += 1
}
for k, v := range values {
if v > 3 {
return 4 * k
}
}
return 0
}
func straight(dices []int, offset int) int {
sort.Ints(dices)
for i, d := range dices {
if d != i+offset {
return 0
}
}
return 30
}