chore(i18n,curriculum): update translations (#43661)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3f51000cf542c50ff08
|
||||
title: 'Problem 137: Fibonacci golden nuggets'
|
||||
title: '問題 137:斐波那契金塊'
|
||||
challengeType: 5
|
||||
forumTopicId: 301765
|
||||
dashedName: problem-137-fibonacci-golden-nuggets
|
||||
@ -8,30 +8,34 @@ dashedName: problem-137-fibonacci-golden-nuggets
|
||||
|
||||
# --description--
|
||||
|
||||
Consider the infinite polynomial series AF(x) = xF1 + x2F2 + x3F3 + ..., where Fk is the kth term in the Fibonacci sequence: 1, 1, 2, 3, 5, 8, ... ; that is, Fk = Fk−1 + Fk−2, F1 = 1 and F2 = 1.
|
||||
考慮無窮級數 $A_{F}(x) = xF_1 + x^2F_2 + x^3F_3 + \ldots$,其中 $F_k$ 是斐波那契數列 $1, 1, 2, 3, 5, 8, \ldots$ 的第 $k$ 項;即 $F_k = F_{k − 1} + F_{k − 2}, F_1 = 1$,$F_2 = 1$。
|
||||
|
||||
For this problem we shall be interested in values of x for which AF(x) is a positive integer.
|
||||
在這個問題中,我們關注的是那些使得 $A_{F}(x)$ 爲正整數的 $x$ 的值。
|
||||
|
||||
Surprisingly AF(1/2)
|
||||
令人驚訝的是:
|
||||
|
||||
=
|
||||
$$\begin{align} A_F(\frac{1}{2}) & = (\frac{1}{2}) × 1 + {(\frac{1}{2})}^2 × 1 + {(\frac{1}{2})}^3 × 2 + {(\frac{1}{2})}^4 × 3 + {(\frac{1}{2})}^5 × 5 + \cdots \\\\ & = \frac{1}{2} + \frac{1}{4} + \frac{2}{8} + \frac{3}{16} + \frac{5}{32} + \cdots \\\\ & = 2 \end{align}$$
|
||||
|
||||
(1/2).1 + (1/2)2.1 + (1/2)3.2 + (1/2)4.3 + (1/2)5.5 + ...
|
||||
前五個對應的自然數 $x$ 如下。
|
||||
|
||||
= 1/2 + 1/4 + 2/8 + 3/16 + 5/32 + ...
|
||||
| $x$ | $A_F(x)$ |
|
||||
| --------------------------- | -------- |
|
||||
| $\sqrt{2} − 1$ | $1$ |
|
||||
| $\frac{1}{2}$ | $2$ |
|
||||
| $\frac{\sqrt{13} − 2}{3}$ | $3$ |
|
||||
| $\frac{\sqrt{89} − 5}{8}$ | $4$ |
|
||||
| $\frac{\sqrt{34} − 3}{5}$ | $5$ |
|
||||
|
||||
= 2 The corresponding values of x for the first five natural numbers are shown below.
|
||||
當 $x$ 是有理數時,我們稱 $A_F(x)$ 是一個金磚,因爲這樣的數字逐漸變得稀少;例如,第 10 個金磚是 74049690。
|
||||
|
||||
xAF(x) √2−11 1/22 (√13−2)/33 (√89−5)/84 (√34−3)/55
|
||||
|
||||
We shall call AF(x) a golden nugget if x is rational, because they become increasingly rarer; for example, the 10th golden nugget is 74049690. Find the 15th golden nugget.
|
||||
請求出第 15 個金磚。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler137()` should return 1120149658760.
|
||||
`goldenNugget()` 應該返回 `1120149658760`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler137(), 1120149658760);
|
||||
assert.strictEqual(goldenNugget(), 1120149658760);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -39,12 +43,12 @@ assert.strictEqual(euler137(), 1120149658760);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler137() {
|
||||
function goldenNugget() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler137();
|
||||
goldenNugget();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37a1000cf542c50fe8d
|
||||
title: 'Problem 14: Longest Collatz sequence'
|
||||
title: '問題 14:最長考拉茲序列'
|
||||
challengeType: 5
|
||||
forumTopicId: 301768
|
||||
dashedName: problem-14-longest-collatz-sequence
|
||||
@ -8,61 +8,61 @@ dashedName: problem-14-longest-collatz-sequence
|
||||
|
||||
# --description--
|
||||
|
||||
The following iterative sequence is defined for the set of positive integers:
|
||||
對正整數集定義如下迭代序列:
|
||||
|
||||
<div style='padding-left: 4em;'><var>n</var> → <var>n</var>/2 (<var>n</var> is even)</div>
|
||||
<div style='padding-left: 4em;'><var>n</var> → <var>n</var> / 2(<var>n</var> 爲偶數)</div>
|
||||
|
||||
<div style='padding-left: 4em;'><var>n</var> → 3<var>n</var> + 1 (<var>n</var> is odd)</div>
|
||||
<div style='padding-left: 4em;'><var>n</var> → 3<var>n</var> + 1(<var>n</var> 爲奇數)</div>
|
||||
|
||||
Using the rule above and starting with 13, we generate the following sequence:
|
||||
從 13 開始使用上述規則,我們可以得到如下序列:
|
||||
|
||||
<div style='text-align: center;'>13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1</div>
|
||||
|
||||
It can be seen that this sequence (starting at 13 and finishing at 1) contains 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that all starting numbers finish at 1.
|
||||
可以看出,該序列(從 13 開始到 1 結束)共包含 10 項。 雖然考拉茲猜想尚未得到證明,但是該猜想認爲以任意數字開始,序列均到 1 結束。
|
||||
|
||||
Which starting number, under the given `limit`, produces the longest chain?
|
||||
求出在小於 `limit` 的數中,哪個可以產生最長的考拉茲序列?
|
||||
|
||||
**Note:** Once the chain starts the terms are allowed to go above one million.
|
||||
**注意:** 序列中數字的個數允許超過一百萬。
|
||||
|
||||
# --hints--
|
||||
|
||||
`longestCollatzSequence(14)` should return a number.
|
||||
`longestCollatzSequence(14)` 應該返回一個數字。
|
||||
|
||||
```js
|
||||
assert(typeof longestCollatzSequence(14) === 'number');
|
||||
```
|
||||
|
||||
`longestCollatzSequence(14)` should return 9.
|
||||
`longestCollatzSequence(14)` 應該返回 9。
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(14), 9);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(5847)` should return 3711.
|
||||
`longestCollatzSequence(5847)` 應該返回 3711。
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(5847), 3711);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(46500)` should return 35655.
|
||||
`longestCollatzSequence(46500)` 應該返回 35655。
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(46500), 35655);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(54512)` should return 52527.
|
||||
`longestCollatzSequence(54512)` 應該返回 52527。
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(54512), 52527);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(100000)` should return 77031.
|
||||
`longestCollatzSequence(100000)` 應該返回 77031。
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(100000), 77031);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(1000000)` should return 837799.
|
||||
`longestCollatzSequence(1000000)` 應該返回 837799。
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(1000000), 837799);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3f91000cf542c50ff0b
|
||||
title: 'Problem 141: Investigating progressive numbers, n, which are also square'
|
||||
title: '問題 141:累進平方數 n'
|
||||
challengeType: 5
|
||||
forumTopicId: 301770
|
||||
dashedName: problem-141-investigating-progressive-numbers-n-which-are-also-square
|
||||
@ -8,22 +8,22 @@ dashedName: problem-141-investigating-progressive-numbers-n-which-are-also-squar
|
||||
|
||||
# --description--
|
||||
|
||||
A positive integer, n, is divided by d and the quotient and remainder are q and r respectively. In addition d, q, and r are consecutive positive integer terms in a geometric sequence, but not necessarily in that order.
|
||||
一個正整數 $n$ 除以 $d$ 後得到商 $q$ 和餘數 $r$。 同時 $d$,$q$ 和 $r$ 是一個等比數列中三個連續的正整數項,但順序不要求一致。
|
||||
|
||||
For example, 58 divided by 6 has quotient 9 and remainder 4. It can also be seen that 4, 6, 9 are consecutive terms in a geometric sequence (common ratio 3/2).
|
||||
例如,58 除以 6 後得到商 9 和餘數 4。 可以發現,4、6、9 構成一個等比數列的連續三項(公比爲 $\frac{3}{2}$)。
|
||||
|
||||
We will call such numbers, n, progressive.
|
||||
我們稱這樣的數字 $n$ 爲累進數。
|
||||
|
||||
Some progressive numbers, such as 9 and 10404 = 1022, happen to also be perfect squares. The sum of all progressive perfect squares below one hundred thousand is 124657.
|
||||
一些累進數,如 9 和 10404 = ${102}^2$,同時也是完全平方數。 所有小於十萬的累進平方數之和爲 124657。
|
||||
|
||||
Find the sum of all progressive perfect squares below one trillion (1012).
|
||||
請求出所有小於一萬億(${10}^{12}$)累進平方數之和。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler141()` should return 878454337159.
|
||||
`progressivePerfectSquares()` 應該返回 `878454337159`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler141(), 878454337159);
|
||||
assert.strictEqual(progressivePerfectSquares(), 878454337159);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -31,12 +31,12 @@ assert.strictEqual(euler141(), 878454337159);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler141() {
|
||||
function progressivePerfectSquares() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler141();
|
||||
progressivePerfectSquares();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3fa1000cf542c50ff0d
|
||||
title: 'Problem 142: Perfect Square Collection'
|
||||
title: '問題 142:完全平方數合集'
|
||||
challengeType: 5
|
||||
forumTopicId: 301771
|
||||
dashedName: problem-142-perfect-square-collection
|
||||
@ -8,14 +8,14 @@ dashedName: problem-142-perfect-square-collection
|
||||
|
||||
# --description--
|
||||
|
||||
Find the smallest x + y + z with integers x > y > z > 0 such that x + y, x − y, x + z, x − z, y + z, y − z are all perfect squares.
|
||||
請找出最小的 $x + y + z$,其中整數 $x > y > z > 0$ 需要滿足 $x + y$、$x − y$、$x + z$、$x − z$、$y + z$、$y − z$ 均爲完全平方數。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler142()` should return 1006193.
|
||||
`perfectSquareCollection()` 應該返回 `1006193`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler142(), 1006193);
|
||||
assert.strictEqual(perfectSquareCollection(), 1006193);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -23,12 +23,12 @@ assert.strictEqual(euler142(), 1006193);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler142() {
|
||||
function perfectSquareCollection() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler142();
|
||||
perfectSquareCollection();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user