2018-10-10 22:03:03 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f3e81000cf542c50fefb
|
|
|
|
|
challengeType: 5
|
|
|
|
|
videoUrl: ''
|
2020-10-01 15:54:21 +00:00
|
|
|
|
title: 问题124:有序的激进分子
|
2018-10-10 22:03:03 +00:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
<section id="description"> n,rad(n)的基数是n的不同素因子的乘积。例如,504 = 23×32×7,因此rad(504)= 2×3×7 = 42.如果我们计算1≤n≤10的rad(n),则在rad(n)上对它们进行排序,并进行排序如果激进值相等,我们得到:未分类<p>排序n rad(n) </p><p> n rad(n)k 11 </p><p> 111 22 </p><p> 222 33 </p><p> 423 42 </p><p> 824 55 </p><p> 335 66 </p><p> 936 77 </p><p> 557 82 </p><p> 668 93 </p><p> 779 1010 </p><p> 101010令E(k)为有序n列中的第k个元素;例如,E(4)= 8且E(6)= 9.如果rad(n)按1≤n≤100000排序,则找到E(10000)。 </p></section>
|
|
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
|
<section id="instructions">
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
|
tests:
|
|
|
|
|
- text: <code>euler124()</code>应返回21417。
|
2020-02-17 16:40:55 +00:00
|
|
|
|
testString: assert.strictEqual(euler124(), 21417);
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler124() {
|
|
|
|
|
// Good luck!
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler124();
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|
2020-08-13 15:24:35 +00:00
|
|
|
|
|
|
|
|
|
/section>
|