---
id: 5900f4ea1000cf542c50fffc
challengeType: 5
title: 'Problem 381: (prime-k) factorial'
videoUrl: ''
localeTitle: ''
---

## Description
<section id="description"> Для простого p пусть S (p) = (Σ (pk)!) Mod (p) для 1 ≤ k ≤ 5. <p> Например, если p = 7, (7-1)! + (7-2)! + (7-3)! + (7-4)! + (7-5)! = 6! + 5! + 4! + 3! + 2! = 720 + 120 + 24 + 6 + 2 = 872. Так как 872 mod (7) = 4, S (7) = 4. </p><p> Можно проверить, что ΣS (p) = 480 для 5 ≤ p &lt;100. </p><p> Найти ΣS (p) для 5 ≤ p &lt;108. </p></section>

## Instructions
undefined

## Tests
<section id='tests'>

```yml
tests:
  - text: ''
    testString: 'assert.strictEqual(euler381(), 139602943319822, "<code>euler381()</code> should return 139602943319822.");'

```

</section>

## Challenge Seed
<section id='challengeSeed'>

<div id='js-seed'>

```js
function euler381() {
  // Good luck!
  return true;
}

euler381();

```

</div>



</section>

## Solution
<section id='solution'>

```js
// solution required
```
</section>
