freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.english.md
mrugesh 22afc2a0ca feat(learn): python certification projects (#38216)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Beau Carnes <beaucarnes@gmail.com>
2020-05-27 13:19:08 +05:30

886 B

id, challengeType, isHidden, title, forumTopicId
id challengeType isHidden title forumTopicId
5900f4ae1000cf542c50ffbf 5 false Problem 320: Factorials divisible by a huge integer 301977

Description

Let N(i) be the smallest integer n such that n! is divisible by (i!)1234567890

Let S(u)=∑N(i) for 10 ≤ i ≤ u.

S(1000)=614538266565663.

Find S(1 000 000) mod 1018.

Instructions

Tests

tests:
  - text: <code>euler320()</code> should return 278157919195482660.
    testString: assert.strictEqual(euler320(), 278157919195482660);

Challenge Seed

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

euler320();

Solution

// solution required