Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-70-totient-permutation.chinese.md
Oliver Eyton-Williams 61460c8601 fix: insert blank line after ```
search and replace ```\n< with ```\n\n< to ensure there's an empty line
before closing tags
2020-08-16 04:45:20 +05:30

1.1 KiB
Raw Blame History

id, challengeType, title, videoUrl, localeTitle
id challengeType title videoUrl localeTitle
5900f3b21000cf542c50fec5 5 Problem 70: Totient permutation 问题70欧拉置换

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产生最小值。

Instructions

Tests

tests:
  - text: <code>euler70()</code>应该返回8319823。
    testString: assert.strictEqual(euler70(), 8319823);

Challenge Seed

function euler70() {
  // Good luck!
  return true;
}

euler70();

Solution

// solution required

/section>