freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-108-diophantine-rec...

1.0 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f3d91000cf542c50feeb 5 Problem 108: Diophantine Reciprocals I 问题108丢番图互惠I

Description

在下面的等式中xy和n是正整数。 1 / x + 1 / y = 1 / n对于n = 4恰好有三种不同的解1/5 + 1/20 = 1/4
1/6 + 1/12 = 1/4
1/8 + 1/8 = 1/4不同解的数量超过一千的n的最小值是多少?

Instructions

Tests

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

Challenge Seed

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

diophantineOne();

Solution

// solution required