freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-329-prime-frog.md

56 lines
1.5 KiB
Markdown
Raw Normal View History

---
id: 5900f4b51000cf542c50ffc8
challengeType: 5
videoUrl: ''
localeTitle: 问题329Prime Frog
---
## Description
<section id="description">苏珊有一只青蛙。她的青蛙跳过500个正方形编号为1到500.他只能以相同的概率跳到左边或右边的一个方格,并且他不能超出范围[1; 500]。(如果它落在任何一个结束时,它会在下一步移动时自动跳转到唯一可用的方格。) <p>当他在一个带有素数的正方形上时他在跳到下一个正方形之前以概率1/3以概率2/3或“N”不是PRIME弯曲&#39;P&#39;PRIME。当他在一个上面有一个不是素数的数字的正方形时他会在跳到下一个正方形之前以概率为1/3或&#39;N&#39;以概率2/3歪曲&#39;P&#39;</p><p>鉴于青蛙的起始位置是随机的每个方格具有相同的概率并且考虑到她听到他的前15个呱呱声她听到PPPPNNPPPNPPNPN序列的概率是多少 </p><p>以简化形式给出你的答案作为p / q的分数。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler329()</code>应返回199740353/29386561536000。
testString: assert.strictEqual(euler329(), 199740353 / 29386561536000);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler329() {
// Good luck!
return true;
}
euler329();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>