$ n ^ 2 + an + b $,其中$ | a | <range $和$ | b | \ le $ $其中$ | n | $是$ n $的模数/绝对值,例如$ | 11 | = 11 $和$ | -4 | = 4 $
找到系数的乘积,$ a $和$ b $,用于生成连续值$ n $的最大素数数的二次表达式,从$ n = 0 $开始。
quadraticPrimes(200)
应返回-4925。
testString: 'assert(quadraticPrimes(200) == -4925, "quadraticPrimes(200)
should return -4925.");'
- text: quadraticPrimes(500)
应返回-18901。
testString: 'assert(quadraticPrimes(500) == -18901, "quadraticPrimes(500)
should return -18901.");'
- text: quadraticPrimes(800)
应返回-43835。
testString: 'assert(quadraticPrimes(800) == -43835, "quadraticPrimes(800)
should return -43835.");'
- text: quadraticPrimes(1000)
应返回-59231。
testString: 'assert(quadraticPrimes(1000) == -59231, "quadraticPrimes(1000)
should return -59231.");'
```