Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

85 lines
1020 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4091000cf542c50ff1c
title: 问题157解决丢番图方程
challengeType: 5
videoUrl: ''
dashedName: problem-157-solving-the-diophantine-equation
---
# --description--
491/5000
考虑具有abpn个正整数且a≤b的双色子方程1 / a + 1 / b = p / 10n。
对于n = 1此等式有20个解决方案如下所示
1/1 + 1/1 = 20/10
1/1 + 1/2 = 15/10
1/1 + 1/5 = 12/10
1/1 + 1/10 = 11/10
1/2 + 1/2 = 10/10
1/2 + 1/5 = 7/10
1/2 + 1/10 = 6/10
1/3 + 1/6 = 5/10
1/3 + 1/15 = 4/10
1/4 + 1/4 = 5/10
1/4 + 1/20 = 3/10
1/5 + 1/5 = 4/10
1/5 + 1/10 = 3/10
1/6 + 1/30 = 2/10
1/10 + 1/10 = 2/10
1/11 + 1/110 = 1/10
1/12 + 1/60 = 1/10
1/14 + 1/35 = 1/10
1/15 + 1/30 = 1/10
1/20 + 1/20 = 1/10
对于1≤n≤9该方程有多少个解
# --hints--
`euler157()`应返回53490。
```js
assert.strictEqual(euler157(), 53490);
```
# --seed--
## --seed-contents--
```js
function euler157() {
return true;
}
euler157();
```
# --solutions--
```js
// solution required
```