package one import ( "strconv" "strings" ) func mustConv(s string) int { n, err := strconv.Atoi(s) if err != nil { panic(err) } return n } func intsFromString(s string) []int { nums := []int{} for _, r := range strings.Fields(s) { nums = append(nums, mustConv(r)) } return nums }