freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-450-hypocycloid-and...

55 lines
2.3 KiB
Markdown
Raw Normal View History

---
id: 5900f52e1000cf542c510041
challengeType: 5
title: 'Problem 450: Hypocycloid and Lattice points'
videoUrl: ''
localeTitle: 问题450Hypocycloid和Lattice点
---
## Description
<section id="description">内摆线是由在较大圆内滚动的小圆上的点绘制的曲线。以原点为中心,从最右边开始的内摆线的参数方程由下式给出:$ xt=R - r\ cost+ r \ cos\ frac {R - r} rt$ $ yt=R - r\ sint - r \ sin\ frac {R - r} rt$其中R是大圆的半径r是小圆的半径圈。 <p>设$ CRr$是具有半径为R和r的内摆线上的整数坐标的不同点的集合并且对应的值为t使得$ \ sint$和$ \ cos t$是有理数。 </p><p>设$ SRr= \ sum _ {xy\ in CRr} | x | + | y | $是$ CRr$中点的x和y坐标的绝对值之和。 </p><p>设$ TN= \ sum <em>{R = 3} ^ N \ sum</em> {r = 1} ^ {\ lfloor \ frac {R - 1} 2 \ rfloor} SRr$是$的总和SRr$表示R和r正整数$ R \ leq N $和$ 2r &lt;R $。 </p><p>给出C3,1= {3,0-1,2 - 1,0 - 1-2} C2500,1000= {2500 0772,2376772-2376516,1792516-1792500,068,50468-504 -1356,1088 - 1356-1088 - 1500,1000 - 1500-1000} </p><p>注意:( - 625,0不是C2500,1000的元素因为$ \ sint$不是t的相应值的有理数。 </p><p> S3,1=| 3 | + | 0 |+| -1 | + | 2 |+| -1 | + | 0 |+| -1 | + | -2 | = 10 </p><p> T3= 10; T10= 524; T100= 580442; T103= 583108600。 </p><p>求T106</p></section>
## Instructions
undefined
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler450()</code>应该返回583333163984220900。
testString: 'assert.strictEqual(euler450(), 583333163984220900, "<code>euler450()</code> should return 583333163984220900.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler450() {
// Good luck!
return true;
}
euler450();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>