1.9 KiB
1.9 KiB
id, challengeType, videoUrl, title
id | challengeType | videoUrl | title |
---|---|---|---|
5900f3861000cf542c50fe99 | 5 | 问题26:互惠周期 |
Description
二分之一 = 0.5
三分之一 = 0(3)
四分之一 = 0.25
的1/5 = 0.2
六分之一 = 0.1(6)
七分之一 = 0(142857)
八分之一 = 0.125
九分之一 = 0(1)
一十分之一 = 0.1
Instructions
Tests
tests:
- text: <code>reciprocalCycles(700)</code>应该返回659。
testString: assert(reciprocalCycles(700) == 659);
- text: <code>reciprocalCycles(800)</code>应该返回743。
testString: assert(reciprocalCycles(800) == 743);
- text: <code>reciprocalCycles(900)</code>应该返回887。
testString: assert(reciprocalCycles(900) == 887);
- text: <code>reciprocalCycles(1000)</code>应该返回983。
testString: assert(reciprocalCycles(1000) == 983);
Challenge Seed
function reciprocalCycles(n) {
// Good luck!
return n;
}
reciprocalCycles(1000);
Solution
// solution required
/section>