freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-412-gnomon-numberin...

1.3 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f5081000cf542c51001a 5 Problem 412: Gnomon numbering 问题412Gnomon编号

Description

对于整数mn0≤n<m令Lmn为m×m网格其中右上n×n网格被移除。

例如L5,3看起来像这样

我们希望用连续的整数1,2,3 ......对Lmn的每个单元进行编号使得每个单元格中的数字小于它下面和左边的数字。

例如这里有两个有效的L5,3编号

设LCmn为Lmn的有效编号。可以证实LC3,0= 42LC5,3= 250250LC6,3= 406029023400和LC10,5mod 76543217 = 61251715。

找到LC10000,5000mod 76543217。

Instructions

Tests

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

Challenge Seed

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

euler412();

Solution

// solution required