* 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>
830 B
830 B
id, title, challengeType, videoUrl, dashedName
id | title | challengeType | videoUrl | dashedName |
---|---|---|---|---|
5900f3e61000cf542c50fef9 | 问题122:有效取幂 | 5 | problem-122-efficient-exponentiation |
--description--
最简单的计算n15的方法需要十四次乘法:n×n×...×n = n15但是使用“二进制”方法可以在六次乘法中计算它:n×n = n2n2×n2 = n4n4×n4 = n8n8 ×n4 = n12n12×n2 = n14n14×n = n15然而,只能在五次乘法中计算它:n×n = n2n2×n = n3n3×n3 = n6n6×n6 = n12n12×n3 = n15我们将定义m (k)是计算nk的最小乘法数;例如m(15)= 5.对于1≤k≤200,找到Σm(k)。
--hints--
euler122()
应返回1582。
assert.strictEqual(euler122(), 1582);
--seed--
--seed-contents--
function euler122() {
return true;
}
euler122();
--solutions--
// solution required