freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-168-number-rotation...

943 B
Raw Blame History

id title challengeType forumTopicId dashedName
5900f4151000cf542c50ff27 問題 168: 数の循環 5 301802 problem-168-number-rotations

--description--

142857 という数について考えます。 最下位の数字 (7) を最上位に移すことによりこの数を右に循環させると、714285 が得られます。

714285 = 5 × 142857 であることを確認できます。

これは、右に循環させた数の約数であるという、142857 が持つ珍しい性質を示しています。

10 < n < 10100 のとき、この性質を持つ整数 n の総和の下位 5 桁を求めなさい。

--hints--

numberRotations()59206 を返す必要があります。

assert.strictEqual(numberRotations(), 59206);

--seed--

--seed-contents--

function numberRotations() {

  return true;
}

numberRotations();

--solutions--

// solution required