chore(i18n,curriculum): update translations (#44186)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3ef1000cf542c50ff01
|
||||
title: 'Problem 129: Repunit divisibility'
|
||||
title: '问题 129:纯元数可分性'
|
||||
challengeType: 5
|
||||
forumTopicId: 301756
|
||||
dashedName: problem-129-repunit-divisibility
|
||||
@ -8,20 +8,20 @@ dashedName: problem-129-repunit-divisibility
|
||||
|
||||
# --description--
|
||||
|
||||
A number consisting entirely of ones is called a repunit. We shall define R(k) to be a repunit of length k; for example, R(6) = 111111.
|
||||
完全由 1 组成的数字称为纯元数(repunit)。 我们定义 $R(k)$ 为长度为 $k$ 的纯元数;例如,$R(6) = 111111$。
|
||||
|
||||
Given that n is a positive integer and GCD(n, 10) = 1, it can be shown that there always exists a value, k, for which R(k) is divisible by n, and let A(n) be the least such value of k; for example, A(7) = 6 and A(41) = 5.
|
||||
定义正整数 $n$ 满足 $GCD(n, 10) = 1$,可以证明总是存在 $k$,使 $R(k)$ 可以被 $n$ 整除,记 $A(n)$ 为满足条件的 $k$ 的最小值;例如,$A(7) = 6$ 而 $A(41) = 5$。
|
||||
|
||||
The least value of n for which A(n) first exceeds ten is 17.
|
||||
使得 $A(n)$ 第一次超过 10 的 $n$ 的值是 17。
|
||||
|
||||
Find the least value of n for which A(n) first exceeds one-million.
|
||||
找到使得 $A(n)$ 第一次超过 100 万的 $n$ 的值。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler129()` should return 1000023.
|
||||
`repunitDivisibility()` 应该返回 `1000023`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler129(), 1000023);
|
||||
assert.strictEqual(repunitDivisibility(), 1000023);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -29,12 +29,12 @@ assert.strictEqual(euler129(), 1000023);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler129() {
|
||||
function repunitDivisibility() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler129();
|
||||
repunitDivisibility();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3ee1000cf542c50ff00
|
||||
title: 'Problem 130: Composites with prime repunit property'
|
||||
title: '问题 130:具有素数纯元数特性的合数'
|
||||
challengeType: 5
|
||||
forumTopicId: 301758
|
||||
dashedName: problem-130-composites-with-prime-repunit-property
|
||||
@ -8,22 +8,22 @@ dashedName: problem-130-composites-with-prime-repunit-property
|
||||
|
||||
# --description--
|
||||
|
||||
A number consisting entirely of ones is called a repunit. We shall define R(k) to be a repunit of length k; for example, R(6) = 111111.
|
||||
完全由 1 组成的数字称为纯元数(repunit)。 我们定义 $R(k)$ 为长度为 $k$ 的纯元数;例如, $R(6) = 111111$。
|
||||
|
||||
Given that n is a positive integer and GCD(n, 10) = 1, it can be shown that there always exists a value, k, for which R(k) is divisible by n, and let A(n) be the least such value of k; for example, A(7) = 6 and A(41) = 5.
|
||||
定义正整数 $n$ 满足 $GCD(n, 10) = 1$,可以证明总是存在 $k$,使 $R(k)$ 可以被 $n$ 整除,记 $A(n)$ 为满足条件的 $k$ 的最小值;例如,$A(7) = 6$ 而 $A(41) = 5$。
|
||||
|
||||
You are given that for all primes, p > 5, that p − 1 is divisible by A(p). For example, when p = 41, A(41) = 5, and 40 is divisible by 5.
|
||||
已知,对于所有的素数 $p > 5$,$p − 1$ 可以被 $A(p)$ 整除。 例如,当 $p = 41, A(41) = 5$,而 40 可以被 5 整除。
|
||||
|
||||
However, there are rare composite values for which this is also true; the first five examples being 91, 259, 451, 481, and 703.
|
||||
然而,也有一些罕见的复合值也是如此。前五个示例是 91、259、451、481 和 703。
|
||||
|
||||
Find the sum of the first twenty-five composite values of n for whichGCD(n, 10) = 1 and n − 1 is divisible by A(n).
|
||||
找出 $n$ 的前 25 个复合值的总和,其中 $GCD(n, 10) = 1$ 且 $n − 1$ 可被 $A(n)$ 整除。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler130()` should return 149253.
|
||||
`compositeRepunit()` 应该返回 `149253`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler130(), 149253);
|
||||
assert.strictEqual(compositeRepunit(), 149253);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -31,12 +31,12 @@ assert.strictEqual(euler130(), 149253);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler130() {
|
||||
function compositeRepunit() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler130();
|
||||
compositeRepunit();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3ef1000cf542c50ff02
|
||||
title: 'Problem 131: Prime cube partnership'
|
||||
title: '问题 131:立方伙伴素数'
|
||||
challengeType: 5
|
||||
forumTopicId: 301759
|
||||
dashedName: problem-131-prime-cube-partnership
|
||||
@ -8,20 +8,20 @@ dashedName: problem-131-prime-cube-partnership
|
||||
|
||||
# --description--
|
||||
|
||||
There are some prime values, p, for which there exists a positive integer, n, such that the expression n3 + n2p is a perfect cube.
|
||||
存在一些素数 $p$,使得存在正整数 $n$,让算式 $n^3 + n^{2}p$ 得到一个立方数。
|
||||
|
||||
For example, when p = 19, 83 + 82×19 = 123.
|
||||
例如当 $p = 19,\\ 8^3 + 8^2 × 19 = {12}^3$。
|
||||
|
||||
What is perhaps most surprising is that for each prime with this property the value of n is unique, and there are only four such primes below one-hundred.
|
||||
最奇特的是 $n$ 的值对于这个素数具有唯一性,100 以内只有四个这种素数。
|
||||
|
||||
How many primes below one million have this remarkable property?
|
||||
一百万以下的素数有多少具有这种非凡特性?
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler131()` should return 173.
|
||||
`primeCubePartnership()` 应该返回 `173`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler131(), 173);
|
||||
assert.strictEqual(primeCubePartnership(), 173);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -29,12 +29,12 @@ assert.strictEqual(euler131(), 173);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler131() {
|
||||
function primeCubePartnership() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler131();
|
||||
primeCubePartnership();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3f11000cf542c50ff03
|
||||
title: 'Problem 132: Large repunit factors'
|
||||
title: '问题 132:大纯元数因子'
|
||||
challengeType: 5
|
||||
forumTopicId: 301760
|
||||
dashedName: problem-132-large-repunit-factors
|
||||
@ -8,18 +8,18 @@ dashedName: problem-132-large-repunit-factors
|
||||
|
||||
# --description--
|
||||
|
||||
A number consisting entirely of ones is called a repunit. We shall define R(k) to be a repunit of length k.
|
||||
完全由 1 组成的数字称为纯元数(repunit)。 我们定义 $R(k)$ 为长度 $k$ 的纯元数。
|
||||
|
||||
For example, R(10) = 1111111111 = 11×41×271×9091, and the sum of these prime factors is 9414.
|
||||
例如 $R(10) = 1111111111 = 11 × 41 × 271 × 9091$,则其素数因子的和为 9414。
|
||||
|
||||
Find the sum of the first forty prime factors of R(109).
|
||||
求 $R({10}^9)$ 的前 40 个素数因子的和。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler132()` should return 843296.
|
||||
`largeRepunitFactors()` 应该返回 `843296`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler132(), 843296);
|
||||
assert.strictEqual(largeRepunitFactors(), 843296);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -27,12 +27,12 @@ assert.strictEqual(euler132(), 843296);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler132() {
|
||||
function largeRepunitFactors() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler132();
|
||||
largeRepunitFactors();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3f21000cf542c50ff04
|
||||
title: 'Problem 133: Repunit nonfactors'
|
||||
title: '问题 133:纯元数非因子'
|
||||
challengeType: 5
|
||||
forumTopicId: 301761
|
||||
dashedName: problem-133-repunit-nonfactors
|
||||
@ -8,20 +8,20 @@ dashedName: problem-133-repunit-nonfactors
|
||||
|
||||
# --description--
|
||||
|
||||
A number consisting entirely of ones is called a repunit. We shall define R(k) to be a repunit of length k; for example, R(6) = 111111.
|
||||
完全由 1 组成的数字称为纯元数。 定义 $R(k)$ 为长度为 $k$ 的纯元数;例如,$R(6) = 111111$。
|
||||
|
||||
Let us consider repunits of the form R(10n).
|
||||
让我们考虑形式为 $R({10}^n)$ 的纯元数。
|
||||
|
||||
Although R(10), R(100), or R(1000) are not divisible by 17, R(10000) is divisible by 17. Yet there is no value of n for which R(10n) will divide by 19. In fact, it is remarkable that 11, 17, 41, and 73 are the only four primes below one-hundred that can be a factor of R(10n).
|
||||
尽管 $R(10)$、$R(100)$ 或 $R(1000)$ 不能被 17 整除,但 $R(10000)$ 可以被 17 整除。 然而没有 $R({10}^n)$ 可以被 19 整除。 值得注意的是,11、17、41 和 73 是仅有的四个小于 100 的质数可以是 $R({10}^n)$ 的因数。
|
||||
|
||||
Find the sum of all the primes below one-hundred thousand that will never be a factor of R(10n).
|
||||
求十万以内不能成为 $R({10}^n)$ 因子的素数的和。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler133()` should return 453647705.
|
||||
`repunitNonfactors()` 应该返回 `453647705`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler133(), 453647705);
|
||||
assert.strictEqual(repunitNonfactors(), 453647705);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -29,12 +29,12 @@ assert.strictEqual(euler133(), 453647705);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler133() {
|
||||
function repunitNonfactors() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler133();
|
||||
repunitNonfactors();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3f21000cf542c50ff05
|
||||
title: 'Problem 134: Prime pair connection'
|
||||
title: '问题 134:素数对连接'
|
||||
challengeType: 5
|
||||
forumTopicId: 301762
|
||||
dashedName: problem-134-prime-pair-connection
|
||||
@ -8,18 +8,18 @@ dashedName: problem-134-prime-pair-connection
|
||||
|
||||
# --description--
|
||||
|
||||
Consider the consecutive primes p1 = 19 and p2 = 23. It can be verified that 1219 is the smallest number such that the last digits are formed by p1 whilst also being divisible by p2.
|
||||
考虑连续的素数 $p_1 = 19$ 和 $p_2 = 23$。 可以验证 1219 是最小的以数字 $p_1$ 形成低位部分,而又能够被 $p_2$ 整除的数字。
|
||||
|
||||
In fact, with the exception of p1 = 3 and p2 = 5, for every pair of consecutive primes, p2 > p1, there exist values of n for which the last digits are formed by p1 and n is divisible by p2. Let S be the smallest of these values of n.
|
||||
事实上,除了 $p_1 = 3$ 和 $p_2 = 5$ 之外,对于每对连续的素数,$p_2 > p_1$,都存在 $n$ 的值,其最后一位数字由 $p_1$ 组成而 $n$ 可以被 $p_2$ 整除。 记 $S$ 为这种 $n$ 中的最小值。
|
||||
|
||||
Find ∑ S for every pair of consecutive primes with 5 ≤ p1 ≤ 1000000.
|
||||
对连续素数对 $5 ≤ p_1 ≤ 1000000$ 求 $\sum{S}$。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler134()` should return 18613426663617120.
|
||||
`primePairConnection()` 应得 `18613426663617120`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler134(), 18613426663617120);
|
||||
assert.strictEqual(primePairConnection(), 18613426663617120);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -27,12 +27,12 @@ assert.strictEqual(euler134(), 18613426663617120);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler134() {
|
||||
function primePairConnection() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler134();
|
||||
primePairConnection();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3f61000cf542c50ff09
|
||||
title: 'Problem 138: Special isosceles triangles'
|
||||
title: '问题 138:特殊的等腰三角形'
|
||||
challengeType: 5
|
||||
forumTopicId: 301766
|
||||
dashedName: problem-138-special-isosceles-triangles
|
||||
@ -8,16 +8,22 @@ dashedName: problem-138-special-isosceles-triangles
|
||||
|
||||
# --description--
|
||||
|
||||
Consider the isosceles triangle with base length, b = 16, and legs, L = 17.
|
||||
考虑一个底边长为 $b = 16$,腰长为 $L = 17$ 的等腰三角形。
|
||||
|
||||
By using the Pythagorean theorem it can be seen that the height of the triangle, h = √(172 − 82) = 15, which is one less than the base length. With b = 272 and L = 305, we get h = 273, which is one more than the base length, and this is the second smallest isosceles triangle with the property that h = b ± 1. Find ∑ L for the twelve smallest isosceles triangles for which h = b ± 1 and b, L are positive integers.
|
||||
<img class="img-responsive center-block" alt="等腰三角形有两条长度相等记为 L 的腰,和一条记为 b 底;则该三角形的高 h 为从底边作高至两条腰的夹角。" src="https://cdn.freecodecamp.org/curriculum/project-euler/special-isosceles-triangles.png" style="background-color: white; padding: 10px;" />
|
||||
|
||||
使用毕达哥拉斯定理,可以求出三角形的高为 $h = \sqrt{{17}^2 − 8^2} = 15$,恰好比底边长度小 1。
|
||||
|
||||
当等腰三角形底边长为 $b = 272$,腰长为 $L = 305$ 时,计算可得高为 $h = 273$,恰好比底边长度大 1,并且这是第二小的满足性质 $h = b ± 1$ 的等腰三角形。
|
||||
|
||||
找到最小的 12 个满足 $h = b ± 1$ 且 $b$,$L$ 均为正整数的等腰三角形,求 $\sum{L}$。
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler138()` should return 1118049290473932.
|
||||
`isoscelesTriangles()` 应该返回 `1118049290473932`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler138(), 1118049290473932);
|
||||
assert.strictEqual(isoscelesTriangles(), 1118049290473932);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -25,12 +31,12 @@ assert.strictEqual(euler138(), 1118049290473932);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler138() {
|
||||
function isoscelesTriangles() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler138();
|
||||
isoscelesTriangles();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3fd1000cf542c50ff10
|
||||
title: 'Problem 145: How many reversible numbers are there below one-billion?'
|
||||
title: '问题 145:有多少个小于十亿的可逆数?'
|
||||
challengeType: 5
|
||||
forumTopicId: 301774
|
||||
dashedName: problem-145-how-many-reversible-numbers-are-there-below-one-billion
|
||||
@ -8,18 +8,18 @@ dashedName: problem-145-how-many-reversible-numbers-are-there-below-one-billion
|
||||
|
||||
# --description--
|
||||
|
||||
Some positive integers n have the property that the sum \[ n + reverse(n) ] consists entirely of odd (decimal) digits. For instance, 36 + 63 = 99 and 409 + 904 = 1313. We will call such numbers reversible; so 36, 63, 409, and 904 are reversible. Leading zeroes are not allowed in either n or reverse(n).
|
||||
一些正整数 $n$ 满足如下性质:该数与其逆序数之和 [ $n + reverse(n)$ ] 全部由奇数(十进制)组成。 例如,$36 + 63 = 99$ 和 $409 + 904 = 1313$。 我们称这些数字是可逆的;所以 36、63、409 和 904 均为可逆的。 无论是 $n$ 还是 $reverse(n)$ 均不允许出现前导零。
|
||||
|
||||
There are 120 reversible numbers below one-thousand.
|
||||
小于一千的可逆数有 120 个。
|
||||
|
||||
How many reversible numbers are there below one-billion (109)?
|
||||
请求出有多少个小于十亿(${10}^9$)的可逆数?
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler145()` should return 608720.
|
||||
`reversibleNumbers()` 应该返回 `608720`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler145(), 608720);
|
||||
assert.strictEqual(reversibleNumbers(), 608720);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -27,12 +27,12 @@ assert.strictEqual(euler145(), 608720);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler145() {
|
||||
function reversibleNumbers() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler145();
|
||||
reversibleNumbers();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f36f1000cf542c50fe82
|
||||
title: 'Problem 3: Largest prime factor'
|
||||
title: '问题 3:最大素数因子'
|
||||
challengeType: 5
|
||||
forumTopicId: 301952
|
||||
dashedName: problem-3-largest-prime-factor
|
||||
@ -8,55 +8,55 @@ dashedName: problem-3-largest-prime-factor
|
||||
|
||||
# --description--
|
||||
|
||||
The prime factors of 13195 are 5, 7, 13 and 29.
|
||||
13195 的素数因子是 5、7、13 和 29。
|
||||
|
||||
What is the largest prime factor of the given `number`?
|
||||
求给出数 `number` 的最大素数因子是多少?
|
||||
|
||||
# --hints--
|
||||
|
||||
`largestPrimeFactor(2)` should return a number.
|
||||
`largestPrimeFactor(2)` 应该返回一个数字。
|
||||
|
||||
```js
|
||||
assert(typeof largestPrimeFactor(2) === 'number');
|
||||
```
|
||||
|
||||
`largestPrimeFactor(2)` should return 2.
|
||||
`largestPrimeFactor(2)` 应该返回 2。
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(2), 2);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(3)` should return 3.
|
||||
`largestPrimeFactor(3)` 应该返回 3。
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(3), 3);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(5)` should return 5.
|
||||
`largestPrimeFactor(5)` 应该返回 5。
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(5), 5);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(7)` should return 7.
|
||||
`largestPrimeFactor(7)` 应该返回 7。
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(7), 7);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(8)` should return 2.
|
||||
`largestPrimeFactor(8)` 应该返回 2。
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(8), 2);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(13195)` should return 29.
|
||||
`largestPrimeFactor(13195)` 应该返回 29。
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(13195), 29);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(600851475143)` should return 6857.
|
||||
`largestPrimeFactor(600851475143)` 应该返回 6857。
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(600851475143), 6857);
|
||||
|
Reference in New Issue
Block a user