package main import ( "fmt" ) func main() { ms := []int{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} ans := 0 for i := 1; i <= 31; i++ { m := (i / 10) + (i % 10) if i <= ms[m] { ans++ // fmt.Printf("%d / %d\n", m, i) } } fmt.Println(ans) }