Files
freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-451-modular-inverses.chinese.md
Kristofer Koishigawa b3213fc892 fix(i18n): chinese test suite (#38220)
* fix: Chinese test suite

Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working.

* fix: ran script, updated testStrings and solutions
2020-03-03 18:49:47 +05:30

1.1 KiB
Raw Blame History

id, challengeType, title, videoUrl, localeTitle
id challengeType title videoUrl localeTitle
5900f5311000cf542c510042 5 Problem 451: Modular inverses 问题451模逆

Description

考虑数字15.有八个正数小于15它们与151,2,4,7,8,11,13,14相互作用。这些数模15的模数逆是1,8,4 13,2,11,7,14因为1 * 1 mod 15 = 1 2 * 8 = 16 mod 15 = 1 4 * 4 = 16 mod 15 = 1 7 * 13 = 91 mod 15 = 1 11 * 11 = 121 mod 15 = 1 14 * 14 = 196 mod 15 = 1

设In是小于n-1的最大正数m使得m modulo n的模逆与m本身相等。所以我15= 11。我100= 51和I7= 1。

求3Σn≤2·107的ΣIn

Instructions

Tests

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

Challenge Seed

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

euler451();

Solution

// solution required