package main import "fmt" func main() { const n = 5 var a [n]int for i := 0; i < n; i++ { fmt.Scan(&a[i]) } m := map[int]int{} for _, k := range a { _, ok := m[k] if ok { m[k]++ } else { m[k] = 1 } } flg := 0 for _, v := range m { if 1 < v && v < 4 { flg += v } } var ans string switch flg { case 5: ans = "FULL HOUSE" case 4: ans = "THREE CARD" case 3: ans = "TWO PAIR" case 2: ans = "ONE PAIR" default: ans = "NO HAND" } fmt.Println(ans) }