freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-112-bouncy-numbers....

56 lines
1.4 KiB
Markdown
Raw Normal View History

---
id: 5900f3dd1000cf542c50feef
challengeType: 5
title: 'Problem 112: Bouncy numbers'
videoUrl: ''
localeTitle: 问题112有弹性的数字
---
## Description
<section id="description">如果左边的数字没有超过数字,则从左到右工作,称为递增数字;例如134468。同样如果右边的数字没有超过数字则称为递减数字;例如66420。我们将调用一个既不增加也不减少“有弹性”数的正整数;例如155349。显然不会有任何低于一百的弹性数字但只有超过一千525的数字超过一半是有弹性的。事实上有弹性数字首次达到50的最小数量是538.令人惊讶的是有弹性的数字变得越来越普遍当我们达到21780时有弹性数字的比例等于90。找出有弹性数字的比例正好为99的最小数字。 </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler112()</code>应返回1587000。
testString: 'assert.strictEqual(euler112(), 1587000, "<code>euler112()</code> should return 1587000.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler112() {
// Good luck!
return true;
}
euler112();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>