1.8 KiB
1.8 KiB
id | challengeType | title |
---|---|---|
5900f4411000cf542c50ff53 | 5 | Problem 212: Combined Volume of Cuboids |
Description
Let C1,...,C50000 be a collection of 50000 axis-aligned cuboids such that Cn has parameters
x0 = S6n-5 modulo 10000y0 = S6n-4 modulo 10000z0 = S6n-3 modulo 10000dx = 1 + (S6n-2 modulo 399)dy = 1 + (S6n-1 modulo 399)dz = 1 + (S6n modulo 399)
where S1,...,S300000 come from the "Lagged Fibonacci Generator":
For 1 ≤ k ≤ 55, Sk = [100003 - 200003k + 300007k3] (modulo 1000000)For 56 ≤ k, Sk = [Sk-24 + Sk-55] (modulo 1000000)
Thus, C1 has parameters {(7,53,183),(94,369,56)}, C2 has parameters {(2383,3563,5079),(42,212,344)}, and so on.
The combined volume of the first 100 cuboids, C1,...,C100, is 723581599.
What is the combined volume of all 50000 cuboids, C1,...,C50000 ?
Instructions
Tests
tests:
- text: <code>euler212()</code> should return 328968937309.
testString: assert.strictEqual(euler212(), 328968937309, '<code>euler212()</code> should return 328968937309.');
Challenge Seed
function euler212() {
// Good luck!
return true;
}
euler212();
Solution
// solution required