freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-129-repunit-divisib...

640 B
Raw Blame History

id title challengeType videoUrl
5900f3ef1000cf542c50ff01 问题129重新划分可分性 5

--description--

完全由1组成的数字称为repunit。我们将Rk定义为长度k的重新定位;例如R6= 111111.假设n是正整数且GCDn10= 1则可以证明总是存在一个值k其中Rk可被n整除让An成为k的最小值;例如A7= 6且A41= 5.An首先超过10的n的最小值是17.求出An首先超过1的n的最小值 - 百万。

--hints--

euler129()应该返回1000023。

assert.strictEqual(euler129(), 1000023);

--solutions--