56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
---
|
||
id: 5900f4331000cf542c50ff45
|
||
challengeType: 5
|
||
title: 'Problem 198: Ambiguous Numbers'
|
||
videoUrl: ''
|
||
localeTitle: 问题198:模糊数字
|
||
---
|
||
|
||
## Description
|
||
<section id="description">对于分母界限d的实数x的最佳近似是有理数r / s(以简化形式),其中s≤d,因此任何比r更接近x的有理数p / q具有q> d。 <p>通常,对于所有分母边界唯一确定对实数的最佳近似。但是,有一些例外,例如9/40对分母界限6具有两个最佳近似值1/4和1/5。如果至少有一个分母绑定为x拥有,我们将称为实数x不明确两个最佳近似值。显然,模糊的数字必然是理性的。 </p><p>有多少个模糊数x = p / q,0 <x <1/100,其分母q是否不超过108? </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler198()</code>应该返回52374425。
|
||
testString: 'assert.strictEqual(euler198(), 52374425, "<code>euler198()</code> should return 52374425.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler198() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler198();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|