freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-247-squares-under-a...

1.2 KiB
Raw Blame History

id challengeType videoUrl title
5900f4641000cf542c50ff76 5 问题247双曲线下的正方形

Description

考虑受1≤x且0≤y≤1/ x约束的区域。

设S1是可以适应曲线的最大正方形。设S2是适合其余区域的最大正方形依此类推。设Sn的指数是表示Sn左边的方格数和Sn以下的方格数的对左下

该图显示了一些用数字标记的方格。 S2左边有一个正方形下面没有正方形所以S2的索引是1,0。可以看出S32的索引是1,1也是S50的索引。 50是Sn的指数为1,1的最大n。

Sn指数为3,3的最大n是多少

Instructions

Tests

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

Challenge Seed

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

euler247();

Solution

// solution required

/section>