* 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>
1.7 KiB
1.7 KiB
id, title, challengeType, videoUrl, dashedName
id | title | challengeType | videoUrl | dashedName |
---|---|---|---|---|
5900f5381000cf542c51004b | 问题460:移动中的蚂蚁 | 5 | problem-460-an-ant-on-the-move |
--description--
在欧几里得平面上,蚂蚁从点A(0,1)行进到点B(d,1)得到整数d。
在每个步骤中,点(x0,y0)处的蚂蚁选择满足x1≥0且y1≥1的格点(x1,y1)之一,并以恒定速度v直接到(x1,y1)。 v取决于y0和y1如下:如果y0 = y1,则v的值等于y0。如果y0≠y1,则v的值等于(y1-y0)/(ln(y1)-ln(y0))。
左图是d = 4的可能路径之一。首先,蚂蚁以速度(3 - 1)/(ln(3) - ln(1)从A(0,1)到达P1(1,3) )≈1.8205。然后所需的时间是sqrt(5)/1.8205≈1.2283。从P1(1,3)到P2(3,3),蚂蚁以速度3行进,因此所需时间为2 /3≈0.6667。从P2(3,3)到B(4,1),蚂蚁以速度(1 - 3)/(ln(1) - ln(3))≈1.8205,所以需要的时间是sqrt(5)/ 1.8205 ...“抓鸟”英语词典1.2283。因此总的所需时间是1.2283 + 0.6667 + 1.2283 = 3.1233。
正确的形象是另一条道路。总的所需时间计算为0.98026 + 1 + 0.98026 = 2.96052。可以证明这是d = 4的最快路径。
如果蚂蚁选择最快的路径,则让F(d)成为所需的总时间。例如,F(4)≈2.960516287。我们可以验证F(10)≈4.6668787834和F(100)≈9.217221972。
找到F(10000)。将您的答案四舍五入到小数点后九位。
--hints--
euler460()
应该返回18.420738199。
assert.strictEqual(euler460(), 18.420738199);
--seed--
--seed-contents--
function euler460() {
return true;
}
euler460();
--solutions--
// solution required