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.3 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f4281000cf542c50ff39 问题186网络的连通性 5 problem-186-connectedness-of-a-network

--description--

以下是来自拥有100万用户的繁忙电话系统的记录

RecNrCallerCalled120000710005326001835004393600863701497 .........来电者的电话号码和记录n中的被叫号码是来电者n= S2n-1和被叫n= S2n其中S1,2,3...来来自“Lagged Fibonacci Generator”

对于1≤k≤55Sk = [100003 - 200003k + 300007k3]模1000000对于56≤kSk = [Sk-24 + Sk-55]模1000000

如果Callern= Calledn则假定用户误操作并且呼叫失败;否则通话成功。

从记录的开头我们说如果X调用Y则任何一对用户X和Y都是朋友反之亦然。类似地如果X是Y的朋友并且Y是Z的朋友则X是Z的朋友的朋友;等等更长的链条。

总理的电话号码是524287.经过多少次成功的电话不计算误操作99的用户包括PM将成为总理的朋友朋友的朋友等

--hints--

euler186()应返回2325629。

assert.strictEqual(euler186(), 2325629);

--seed--

--seed-contents--

function euler186() {

  return true;
}

euler186();

--solutions--

// solution required