* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
1.2 KiB
1.2 KiB
id, title, challengeType, videoUrl, dashedName
id | title | challengeType | videoUrl | dashedName |
---|---|---|---|---|
5900f5101000cf542c510022 | 问题419:先说顺序 | 5 | problem-419-look-and-say-sequence |
--description--
外观序列依次为1,11,21,1211,111221,312211,13112221,1113213211,...
该序列以1开头,并且所有其他成员都是通过用连续数字描述前一个成员而获得的。
大声地这样做有助于:
1是“一个”→11
11是“两个”→21
21是“一二一一”→1211
1211是``一一,一二和二一''→111221
111221是“三,二,二,一”→312211
...
将A(n),B(n)和C(n)分别定义为序列的第n个元素中的1、2和3的数目。 可以验证A(40)= 31254,B(40)= 20259和C(40)= 11625。
找到n(1012)的A(n),B(n)和C(n)。 给您的答案模块230,并用逗号分隔A,B和C的值。 例如 对于n = 40,答案将是31254,20259,11625
--hints--
euler419()
应该返回998567458, 1046245404, 43363922。
assert.strictEqual(euler419(), 998567458, 1046245404, 43363922);
--seed--
--seed-contents--
function euler419() {
return true;
}
euler419();
--solutions--
// solution required