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

2.2 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f54c1000cf542c51005e 问题478混合物 5 problem-478-mixtures

--description--

让我们考虑三种物质的混合物AB和C.混合物可以用其中AB和C的量的比例来描述abc。例如由比例235描述的混合物含有20A30B和50C。

出于这个问题的目的,我们不能将各个组分与混合物分开。但是,我们可以将不同量的不同混合物组合以形成具有新比例的混合物。

例如假设我们有三种比例3023611334的混合物。通过混合10个单位的第一个20个单位的第二个和30个单位的第三个我们得到一个比例659的新混合物因为10·3/5 + 20·3/20 + 30·3/1010·0/5 + 20·6/20 + 30·3/1010·2/5 + 20·11/20 + 30·4/10=181527 =659

然而使用相同的三种混合物不可能形成比例321因为B的量总是小于C的量。

设n是正整数。假设对于0≤abc≤n和gcdabc= 1的整数abc的每三个我们得到具有比率abc的混合。设Mn为所有这些混合物的集合。

例如M2包含具有以下比率的19种混合物{001010011012 0211001011021101111 1212012112220121021 1212221}。

令En为Mn的子集数其可以产生具有比率111的混合物即具有相等部分AB和C的混合物。我们可以验证E1 = 103E2= 520447E10mod 118 = 82608406和E500mod 118 = 13801403.求E10 000 000mod 118。

--hints--

euler478()应该返回59510340。

assert.strictEqual(euler478(), 59510340);

--seed--

--seed-contents--

function euler478() {

  return true;
}

euler478();

--solutions--

// solution required