chore(i8n,learn): processed translations
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
15047f2d90
commit
e5c44a3ae5
@ -1,48 +1,74 @@
|
||||
---
|
||||
id: 594ecc0d9a8cf816e3340187
|
||||
title: 出租车号码
|
||||
title: Taxicab numbers
|
||||
challengeType: 5
|
||||
videoUrl: ''
|
||||
forumTopicId: 302337
|
||||
dashedName: taxicab-numbers
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
[出租车编号](<https://en.wikipedia.org/wiki/Hardy–Ramanujan number> "wp:Hardy-Ramanujan号码") (此处使用的定义)是一个正整数,可以用多种方式表示为两个正立方体的总和。第一个出租车编号是1729,即:1 <sup>3</sup> + 12 <sup>3</sup>和9 <sup>3</sup> + 10 <sup>3</sup> 。出租车号码也被称为:\*出租车号码\*出租车号码\*出租车号码\* Hardy-Ramanujan号码任务:编写一个返回最低N个出租车号码的函数。对于每个出租车编号,显示数字以及它的构成立方体。另请参阅:在线整数序列百科全书上的\[`http://oeis.org/A001235` A001235出租车编号]。 MathWorld上的[Hardy-Ramanujan数字](http://mathworld.wolfram.com/Hardy-RamanujanNumber.html) 。 MathWorld上的[出租车编号](http://mathworld.wolfram.com/TaxicabNumber.html) 。维基百科上的[出租车号码](https://en.wikipedia.org/wiki/Taxicab_number) 。
|
||||
A [taxicab number](https://en.wikipedia.org/wiki/Hardy–Ramanujan number "wp: Hardy–Ramanujan number") (the definition that is being used here) is a positive integer that can be expressed as the sum of two positive cubes in more than one way.
|
||||
|
||||
The first taxicab number is `1729`, which is:
|
||||
|
||||
1<sup>3</sup> + 12<sup>3</sup> and
|
||||
|
||||
9<sup>3</sup> + 10<sup>3</sup>.
|
||||
|
||||
Taxicab numbers are also known as:
|
||||
|
||||
<ul>
|
||||
<li>taxi numbers</li>
|
||||
<li>taxi-cab numbers</li>
|
||||
<li>taxi cab numbers</li>
|
||||
<li>Hardy-Ramanujan numbers</li>
|
||||
</ul>
|
||||
|
||||
# --instructions--
|
||||
|
||||
Write a function that returns the lowest `n` taxicab numbers. For each of the taxicab numbers, show the number as well as its constituent cubes.
|
||||
|
||||
**See also:**
|
||||
|
||||
<ul>
|
||||
<li><a href='https://oeis.org/A001235' target='_blank'>A001235 taxicab numbers</a> on The On-Line Encyclopedia of Integer Sequences.</li>
|
||||
<li><a href='https://en.wikipedia.org/wiki/Taxicab_number' target='_blank'>taxicab number</a> on Wikipedia.</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
`taxicabNumbers`是一个功能。
|
||||
`taxicabNumbers` should be a function.
|
||||
|
||||
```js
|
||||
assert(typeof taxicabNumbers === 'function');
|
||||
```
|
||||
|
||||
`taxicabNumbers`应该返回一个数组。
|
||||
`taxicabNumbers` should return an array.
|
||||
|
||||
```js
|
||||
assert(typeof taxicabNumbers(2) === 'object');
|
||||
```
|
||||
|
||||
`taxicabNumbers`应返回一组数字。
|
||||
`taxicabNumbers` should return an array of numbers.
|
||||
|
||||
```js
|
||||
assert(typeof taxicabNumbers(100)[0] === 'number');
|
||||
```
|
||||
|
||||
`taxicabNumbers(4)`必须返回[1729,4104,13832,20683]。
|
||||
`taxicabNumbers(4)` should return [1729, 4104, 13832, 20683].
|
||||
|
||||
```js
|
||||
assert.deepEqual(taxicabNumbers(4), res4);
|
||||
```
|
||||
|
||||
taxicabNumbers(25)应该返回[1729,4104,13832,20683,32832,39312,40033,46683,64232,65728,110656,110808,134379,149389,165464,171288,195841,216027,216125,262656,314696,320264 ,327763,373464,402597]
|
||||
`taxicabNumbers(25)` should return [1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597]
|
||||
|
||||
```js
|
||||
assert.deepEqual(taxicabNumbers(25), res25);
|
||||
```
|
||||
|
||||
taxicabNumbers(39)由20 - 29得到的数字应为[314496,320264,327763,373464,402597,439101,443889,513000,513856]。
|
||||
`taxicabNumbers(39)` resulting numbers from 20 - 29 should be [314496,320264,327763,373464,402597,439101,443889,513000,513856].
|
||||
|
||||
```js
|
||||
assert.deepEqual(taxicabNumbers(39).slice(20, 29), res39From20To29);
|
||||
|
Reference in New Issue
Block a user