* 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 |
---|---|---|---|---|
5900f4eb1000cf542c50fffd | 问题382:生成多边形 | 5 | problem-382-generating-polygons |
--description--
多边形是由直线段组成的扁平形状,所述直线段连接以形成闭合链或电路。多边形由至少三个边组成,并且不自相交。
如果:P的两边不是相同的长度,P的每一边的长度在S中,并且S不包含其他值,则称正数的集合S生成多边形P.
例如:集合{3,4,5}生成边3,4和5(三角形)的多边形。集合{6,9,11,24}生成具有边6,9,11和24(四边形)的多边形。集合{1,2,3}和{2,3,4,9}根本不生成任何多边形。
考虑序列s,定义如下:s1 = 1,s2 = 2,s3 = 3 sn = sn-1 + sn-3,n> 3。
设Un为集合{s1,s2,...,sn}。例如,U10 = {1,2,3,4,6,9,13,19,28,41}。设f(n)是产生至少一个多边形的Un子集的数量。例如,f(5)= 7,f(10)= 501,f(25)= 18635853。
找到f(1018)的最后9位数。
--hints--
euler382()
应该返回697003956。
assert.strictEqual(euler382(), 697003956);
--seed--
--seed-contents--
function euler382() {
return true;
}
euler382();
--solutions--
// solution required