Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.md
2022-04-02 17:46:30 +09:00

1.0 KiB

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f48d1000cf542c50ff9f 問題 288: 巨大な階乗 5 301939 problem-288-an-enormous-factorial

--description--

任意の素数 p に対し、数 N(p,q)N(p,q) = \sum_{n=0}^q T_n \times p^n と定義されます。T_n は下の乱数生成法で生成されます。

$$\begin{align} & S_0 = 290797 \\ & S_{n + 1} = {S_n}^2\bmod 50\,515\,093 \\ & T_n = S_n\bmod p \end{align}$$

Nfac(p,q) を、N(p,q) の階乗と定義します。

NF(p,q) を、Nfac(p,q) 内の因数 p の数と定義します。

NF(3,10000) \bmod 3^{20} = 624\\,955\\,285 が与えられます。

NF(61,{10}^7)\bmod {61}^{10} を求めなさい。

--hints--

enormousFactorial()605857431263982000 を返す必要があります。

assert.strictEqual(enormousFactorial(), 605857431263982000);

--seed--

--seed-contents--

function enormousFactorial() {

  return true;
}

enormousFactorial();

--solutions--

// solution required