freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-221-alexandrian-int...

1.2 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f4491000cf542c50ff5c 5 Problem 221: Alexandrian Integers 问题221亚历山大整数

Description

如果存在整数pqr我们将调用正整数A和“亚历山大整数”这样
  A = p · q · r    and 1A 

=

  1p 

+

  1q 

+

  1r 

例如630是亚历山大整数p = 5q = -7r = -18。实际上630是第6个亚历山大整数前6个亚历山大整数是6,42,120,156,420和630。

找到第150000个亚历山大整数。

Instructions

Tests

tests:
  - text: <code>euler221()</code>应该返回1884161251122450。
    testString: 'assert.strictEqual(euler221(), 1884161251122450, "<code>euler221()</code> should return 1884161251122450.");'

Challenge Seed

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

euler221();

Solution

// solution required