* 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 |
---|---|---|---|---|
5900f4481000cf542c50ff5b | 问题220:高速公路龙 | 5 | problem-220-heighway-dragon |
--description--
设D0为双字母串“Fa”。对于n≥1,通过字符串重写规则从Dn-1导出Dn:
“a”→“aRbFR”“b”→“LFaLb”
因此,D0 =“Fa”,D1 =“FaRbFR”,D2 =“FaRbFRRLFaLbFR”,等等。
这些字符串可以解释为计算机图形程序的指令,“F”表示“向前绘制一个单位”,“L”表示“向左转90度”,“R”表示“向右转90度”,和“a” “和”b“被忽略了。计算机光标的初始位置是(0,0),指向(0,1)。
然后Dn是一种奇特的绘画,被称为n阶的Heighway Dragon。例如,D10如下所示;将每个“F”计为一步,(18,16)处的突出显示点是500步后达到的位置。
D50中1012步后光标的位置是什么?以x,y的形式给出答案,没有空格。
--hints--
euler220()
应返回139776,963904。
assert.strictEqual(euler220(), 139776, 963904);
--seed--
--seed-contents--
function euler220() {
return true;
}
euler220();
--solutions--
// solution required