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

1.1 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f3ef1000cf542c50ff01 5 Problem 129: Repunit divisibility 问题129重新划分可分性

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的最小值 - 百万。

Instructions

Tests

tests:
  - text: <code>euler129()</code>应该返回1000023。
    testString: 'assert.strictEqual(euler129(), 1000023, "<code>euler129()</code> should return 1000023.");'

Challenge Seed

function euler129() {
  // Good luck!
  return true;
}

euler129();

Solution

// solution required