Oliver Eyton-Williams ee1e8abd87
feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

1.7 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f46c1000cf542c50ff7e 问题256无榻榻米房间 5 problem-256-tatami-free-rooms

--description--

榻榻米是长方形垫子,用于完全覆盖房间的地板,没有重叠。

假设唯一可用的榻榻米尺寸为1×2那么可以覆盖的房间的形状和大小显然存在一些限制。

对于这个问题我们只考虑具有整数尺寸ab和均匀尺寸s = a·b的矩形房间。我们使用术语“大小”来表示房间的地板表面积并且 - 不失一般性 - 我们添加条件a≤b。

铺设榻榻米时要遵循一条规则四个不同垫子的角落必须相遇。例如考虑下面两个4×4房间的安排

左边的排列是可以接受的而右边的排列则不是中间的红色“X”标志着四个榻榻米相遇的点。

由于这个规则某些大小合适的房间不能覆盖榻榻米我们称之为榻榻米房间。此外我们将Ts定义为大小为s的无榻榻米房间的数量。

最小的无榻榻米房间尺寸为s = 70尺寸为7×10。所有其他尺寸为s = 70的房间都可以铺上榻榻米;它们是1×70,2×35和5×14。因此T70= 1。

类似地我们可以验证T1320= 5因为正好有5个无榻榻米的房间大小为s = 132020×66,22×60,24×55,30×44和33×40。事实上s = 1320是Ts= 5的最小房间尺寸。

找到Ts= 200的最小房间大小。

--hints--

euler256()应该返回85765680。

assert.strictEqual(euler256(), 85765680);

--seed--

--seed-contents--

function euler256() {

  return true;
}

euler256();

--solutions--

// solution required