Oliver Eyton-Williams ee1e8abd87
feat(curriculum): restore seed + solution to Chinese (#40683)
* 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>
2021-01-12 19:31:00 -07:00

1.2 KiB
Raw Blame History

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 = 1s2 = 2s3 = 3 sn = sn-1 + sn-3n> 3。

设Un为集合{s1s2...sn}。例如U10 = {1,2,3,4,6,9,13,19,28,41}。设fn是产生至少一个多边形的Un子集的数量。例如f5= 7f10= 501f25= 18635853。

找到f1018的最后9位数。

--hints--

euler382()应该返回697003956。

assert.strictEqual(euler382(), 697003956);

--seed--

--seed-contents--

function euler382() {

  return true;
}

euler382();

--solutions--

// solution required