56 lines
1.1 KiB
Markdown
56 lines
1.1 KiB
Markdown
---
|
||
id: 5900f4c21000cf542c50ffd4
|
||
challengeType: 5
|
||
title: 'Problem 340: Crazy Function'
|
||
videoUrl: ''
|
||
localeTitle: 问题340:疯狂的功能
|
||
---
|
||
|
||
## Description
|
||
<section id="description">对于固定整数a,b,c,定义疯狂函数F(n)如下:F(n)= n - c表示所有n> b F(n)= F(a + F(a + F(a +)所有n≤b的F(a + n))))。 <p>另外,定义S(a,b,c)=。 </p><p>例如,如果a = 50,b = 2000且c = 40,则F(0)= 3240并且F(2000)= 2040.此外,S(50,2000,40)= 5204240。 </p><p>找到S(217,721,127)的最后9位数。 </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler340()</code>应返回291504964。
|
||
testString: 'assert.strictEqual(euler340(), 291504964, "<code>euler340()</code> should return 291504964.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler340() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler340();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|