freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-474-last-digits-of-...

1.1 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f5471000cf542c510059 5 Problem 474: Last digits of divisors 问题474除数的最后数字

Description

对于正整数n和数字d我们将Fnd定义为n的除数的数其最后的数字等于d。例如F84,4= 3.在84的除数中1,2,3,4,6,7,12,14,21,28,42,84其中三个4,14 84有最后一位数字4。

我们还可以验证F1212= 11和F50123= 17888。

找到F10665432modulo1016 + 61

Instructions

Tests

tests:
  - text: <code>euler474()</code>应该返回9690646731515010。
    testString: 'assert.strictEqual(euler474(), 9690646731515010, "<code>euler474()</code> should return 9690646731515010.");'

Challenge Seed

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

euler474();

Solution

// solution required