56 lines
1.1 KiB
Markdown
56 lines
1.1 KiB
Markdown
---
|
||
id: 5900f3b21000cf542c50fec5
|
||
challengeType: 5
|
||
title: 'Problem 70: Totient permutation'
|
||
videoUrl: ''
|
||
localeTitle: 问题70欧拉置换
|
||
---
|
||
|
||
## Description
|
||
<section id="description"> Euler的Totient函数φ(n)[有时称为phi函数]用于确定小于或等于n的正数的数量,它们是n的相对素数。例如,如1,2,4,5,7和8都小于9且相对素数为9,φ(9)= 6.数字1被认为是每个正数的相对素数,所以φ(1)= 1。有趣的是,φ(87109)= 79180,可以看出87109是79180的置换。找到n的值,1 <n <107,其中φ(n)是n的置换和比率n / φ(n)产生最小值。 </section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler70()</code>应该返回8319823。
|
||
testString: 'assert.strictEqual(euler70(), 8319823, "<code>euler70()</code> should return 8319823.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler70() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler70();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|