chore(i18n,curriculum): update translations (#43633)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3cc1000cf542c50fede
|
||||
title: 'Problem 95: Amicable chains'
|
||||
title: '问题 95:友好的数链'
|
||||
challengeType: 5
|
||||
forumTopicId: 302212
|
||||
dashedName: problem-95-amicable-chains
|
||||
@ -8,45 +8,45 @@ dashedName: problem-95-amicable-chains
|
||||
|
||||
# --description--
|
||||
|
||||
The proper divisors of a number are all the divisors excluding the number itself. For example, the proper divisors of 28 are 1, 2, 4, 7, and 14. As the sum of these divisors is equal to 28, we call it a perfect number.
|
||||
一个数的真因子是除自身以外的其他因子。 例如,28 的真因子是 1、2、4、7 和 14。 由于这些真因子之和等于 28,我们称 28 为完全数,又称完美数或完备数。
|
||||
|
||||
Interestingly the sum of the proper divisors of 220 is 284 and the sum of the proper divisors of 284 is 220, forming a chain of two numbers. For this reason, 220 and 284 are called an amicable pair.
|
||||
有趣的是,220 的真因子之和为 284,而 284 的真因子之和为 220,形成了一条两个数构成的链。 因此,220 和 284 被称为友好数对。
|
||||
|
||||
Perhaps less well known are longer chains. For example, starting with 12496, we form a chain of five numbers:
|
||||
也许更长的链条鲜为人知。 例如,从 12496 开始,可以形成一条五个数字的数链:
|
||||
|
||||
$$ 12496 → 14288 → 15472 → 14536 → 14264 \\,(→ 12496 → \cdots) $$
|
||||
|
||||
Since this chain returns to its starting point, it is called an amicable chain.
|
||||
由于该链返回其起始点,因此称为友好数链。
|
||||
|
||||
Find the smallest member of the longest amicable chain with no element exceeding `limit`.
|
||||
找出最长友好数链中的最小数字,要求该链中的每一个数字均不能超过给定的 `limit`。
|
||||
|
||||
# --hints--
|
||||
|
||||
`amicableChains(300)` should return a number.
|
||||
`amicableChains(300)` 应该返回一个数字。
|
||||
|
||||
```js
|
||||
assert(typeof amicableChains(300) === 'number');
|
||||
```
|
||||
|
||||
`amicableChains(300)` should return `220`.
|
||||
`amicableChains(300)` 应该返回 `220`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(amicableChains(300), 220);
|
||||
```
|
||||
|
||||
`amicableChains(15000)` should return `220`.
|
||||
`amicableChains(15000)` 应该返回 `220`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(amicableChains(15000), 220);
|
||||
```
|
||||
|
||||
`amicableChains(100000)` should return `12496`.
|
||||
`amicableChains(100000)` 应该返回 `12496`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(amicableChains(100000), 12496);
|
||||
```
|
||||
|
||||
`amicableChains(1000000)` should return `14316`.
|
||||
`amicableChains(1000000)` 应该返回 `14316`。
|
||||
|
||||
```js
|
||||
assert.strictEqual(amicableChains(1000000), 14316);
|
||||
|
Reference in New Issue
Block a user