1.5 KiB
1.5 KiB
id | challengeType | title |
---|---|---|
5900f5101000cf542c510022 | 5 | Problem 419: Look and say sequence |
Description
Define A(n), B(n) and C(n) as the number of ones, twos and threes in the n'th element of the sequence respectively. One can verify that A(40) = 31254, B(40) = 20259 and C(40) = 11625.
Find A(n), B(n) and C(n) for n = 1012. Give your answer modulo 230 and separate your values for A, B and C by a comma. E.g. for n = 40 the answer would be 31254,20259,11625
Instructions
Tests
tests:
- text: <code>euler419()</code> should return 998567458, 1046245404, 43363922.
testString: assert.strictEqual(euler419(), 998567458, 1046245404, 43363922, '<code>euler419()</code> should return 998567458, 1046245404, 43363922.');
Challenge Seed
function euler419() {
// Good luck!
return true;
}
euler419();
Solution
// solution required