56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
---
|
||
id: 5900f4cb1000cf542c50ffdd
|
||
challengeType: 5
|
||
title: 'Problem 350: Constraining the least greatest and the greatest least'
|
||
videoUrl: ''
|
||
localeTitle: 问题350:约束最小和最小
|
||
---
|
||
|
||
## Description
|
||
<section id="description">大小为n的列表是n个自然数的序列。实例是(2,4,6),(2,6,4),(10,6,15,6)和(11)。 <p>列表的最大公约数(或gcd)是划分列表中所有条目的最大自然数。例子:gcd(2,6,4)= 2,gcd(10,6,15,6)= 1,gcd(11)= 11。 </p><p>列表的最小公倍数或lcm是列表的每个条目可分割的最小自然数。实例:1cm(2,6,4)= 12,1cm(10,6,15,6)= 30和1cm(11)= 11。 </p><p>设f(G,L,N)为大小为N的列表数,gcd≥G且lcm≤L。例如: </p><p> f(10,100,1)= 91.f(10,100,2)= 327.f(10,100,3)= 1135.f(10,100,1000)mod 1014 = 3286053。 </p><p>找到f(106,1012,1018)mod 1014。 </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler350()</code>应该返回84664213。
|
||
testString: 'assert.strictEqual(euler350(), 84664213, "<code>euler350()</code> should return 84664213.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler350() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler350();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|