func C027() (interface{}, error) { maxA, maxB, maxN := 0, 0, 0 for a := -1000; a < 1000; a++ { for b := 0; b < 1000; b++ { n := 0 for utils.IsPrime(n*n + a*n + b) { n++ } if n > maxN { maxN = n maxA = a maxB = b } } } return maxA * maxB, nil }
func isStrPrime(nbStr string) bool { nb, _ := strconv.Atoi(nbStr) return utils.IsPrime(nb) }