1.0 KiB
1.0 KiB
id | challengeType | title | videoUrl | localeTitle |
---|---|---|---|---|
5900f4ea1000cf542c50fffc | 5 | Problem 381: (prime-k) factorial |
Description
Например, если 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.
Можно проверить, что ΣS (p) = 480 для 5 ≤ p <100.
Найти ΣS (p) для 5 ≤ p <108.
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert.strictEqual(euler381(), 139602943319822, "<code>euler381()</code> should return 139602943319822.");'
Challenge Seed
function euler381() {
// Good luck!
return true;
}
euler381();
Solution
// solution required