Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-403-lattice-points-enclosed-by-parabola-and-line.md
2020-10-06 23:10:08 +05:30

1.2 KiB
Raw Blame History

id, challengeType, videoUrl, localeTitle
id challengeType videoUrl localeTitle
5900f5001000cf542c510013 5 问题403由抛物线和直线包围的格点

Description

对于整数a和b我们将Dab定义为由抛物线y = x2包围的域并且线y = a·x + bDab= {xy| x2≤y≤a·x + b}。

Lab定义为Dab中包含的晶格点数。例如L1,2= 8并且L2-1= 1。

我们还将SN定义为所有对ab的Lab之和使得Dab的面积是有理数并且| a || b | ≤N。我们可以验证S5= 344和S100= 26709528。

找到S1012。给你的答案mod 108。

Instructions

Tests

tests:
  - text: <code>euler403()</code>应该返回18224771。
    testString: assert.strictEqual(euler403(), 18224771);

Challenge Seed

function euler403() {
  // Good luck!
  return true;
}

euler403();

Solution

// solution required

/section>