freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.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

53 lines
995 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: 5900f4521000cf542c50ff64
title: 问题229使用正方形的四个表示
challengeType: 5
videoUrl: ''
dashedName: problem-229-four-representations-using-squares
---
# --description--
考虑数字3600.这是非常特别的,因为
3600 = 482 + 362 3600 = 202 + 2×402 3600 = 302 + 3×302 3600 = 452 + 7×152
类似地我们发现88201 = 992 + 2802 = 2872 + 2×542 = 2832 + 3×522 = 1972 + 7×842。
在1747年欧拉证明哪些数字可以表示为两个正方形的总和。我们感兴趣的是数字n它承认以下四种类型的表示
n = a12 + b12n = a22 + 2 b22n = a32 + 3 b32n = a72 + 7 b72
其中ak和bk是正整数。
有75373这样的数字不超过107。
有多少这样的数字不超过2×109
# --hints--
`euler229()`应该返回11325263。
```js
assert.strictEqual(euler229(), 11325263);
```
# --seed--
## --seed-contents--
```js
function euler229() {
return true;
}
euler229();
```
# --solutions--
```js
// solution required
```