freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-326-modulo-summatio...

1.1 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f4b21000cf542c50ffc5 5 Problem 326: Modulo Summations 问题326模数汇总

Description

设一个递归定义的序列:。

因此前10个元素是1,1,0,3,0,3,5,4,1,9。

设fNM表示对pq的数量使得

可以看出f10,10= 43,35,57,99,10

你也得到f104,103= 97158。

求f1012,106

Instructions

Tests

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

Challenge Seed

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

euler326();

Solution

// solution required