freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-409-nim-extreme.chi...

1.1 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f5061000cf542c510017 5 Problem 409: Nim Extreme 问题409Nim Extreme

Description

设n是正整数。考虑nim位置有n个非空桩。每堆的尺寸小于2n。没有两个桩具有相同的尺寸。设Wn是满足上述条件的获胜nim位置的数量如果第一个玩家具有获胜策略则获胜的位置。例如W1= 1W2= 6W3= 168W5= 19764360W100mod 1 000 000 007 = 384777056。

求W10 000 000mod 1 000 000 007。

Instructions

Tests

tests:
  - text: <code>euler409()</code>应该返回253223948。
    testString: 'assert.strictEqual(euler409(), 253223948, "<code>euler409()</code> should return 253223948.");'

Challenge Seed

function euler409() {
  // Good luck!
  return true;
}

euler409();

Solution

// solution required