56 lines
1.8 KiB
Markdown
56 lines
1.8 KiB
Markdown
---
|
||
id: 5900f4b11000cf542c50ffc4
|
||
challengeType: 5
|
||
title: 'Problem 325: Stone Game II'
|
||
videoUrl: ''
|
||
localeTitle: 问题325:石头游戏II
|
||
---
|
||
|
||
## Description
|
||
<section id="description">一场比赛是用两堆石头和两个球员进行的。在轮到她时,玩家从较大的堆中移除了许多石头。她移除的石头数量必须是较小桩中石头数量的正数倍。 <p>例如,让有序对(6,14)描述一个配置,在较小的桩中有6个石头,在较大的桩中有14个石头,那么第一个玩家可以从较大的桩中移除6或12个石头。 </p><p>从一堆中取出所有宝石的玩家赢得比赛。 </p><p>获胜配置是第一个玩家可以强制获胜的配置。例如,(1,5),(2,6)和(3,12)是获胜配置,因为第一个玩家可以立即移除第二堆中的所有宝石。 </p><p>失败的配置是第二个玩家可以强制获胜的配置,无论第一个玩家做什么。例如,(2,3)和(3,4)正在失去配置:任何合法移动都会为第二个玩家留下获胜配置。 </p><p>将S(N)定义为所有丢失配置(xi,yi)的总和(xi + yi),0 <xi <yi≤N。我们可以验证S(10)= 211和S(104)= 230312207313。 </p><p>找到S(1016)mod 710。 </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler325()</code>应该返回54672965。
|
||
testString: 'assert.strictEqual(euler325(), 54672965, "<code>euler325()</code> should return 54672965.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler325() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler325();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|