1.4 KiB
1.4 KiB
id | challengeType | title | videoUrl | localeTitle |
---|---|---|---|---|
5900f5371000cf542c51004a | 5 | Problem 459: Flipping game | 问题459:翻转游戏 |
Description
转弯包括翻转具有以下属性的矩形中的所有磁盘:矩形的右上角包含一个白色圆盘,矩形宽度是一个完美的正方形(1,4,9,16,...),矩形高度为三角形数字(1,3,6,10 ......)
球员轮流转换。玩家通过将网格全黑变为胜利。
假设完美游戏,让W(N)为N×N板上第一个玩家的获胜动作数,所有盘都是白色的。 W(1)= 1,W(2)= 0,W(5)= 8,W(102)= 31395。
对于N = 5,第一个玩家的八个获胜第一步是:
找到W(106)。
Instructions
Tests
tests:
- text: <code>euler459()</code>应该返回3996390106631。
testString: 'assert.strictEqual(euler459(), 3996390106631, "<code>euler459()</code> should return 3996390106631.");'
Challenge Seed
function euler459() {
// Good luck!
return true;
}
euler459();
Solution
// solution required