Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-92-square-digit-chains.md
Oliver Eyton-Williams dec409a4bd fix: s/localeTitle/title/g
2020-10-06 23:10:08 +05:30

1012 B
Raw Blame History

id, challengeType, videoUrl, title
id challengeType videoUrl title
5900f3c81000cf542c50fedb 5 问题92方形数字链

Description

通过在数字中连续添加数字的平方来创建数字链以形成新的数字直到之前看到它为止。例如44→32→13→10→1→1 85→89→145→42→20→4→16→37→58→89因此任何到达1或89的链条都会卡在无限循环中。最令人惊讶的是每个起始号码最终都会达到1或89.低于一千万的起始号码将达到89个

Instructions

Tests

tests:
  - text: <code>euler92()</code>应返回8581146。
    testString: assert.strictEqual(euler92(), 8581146);

Challenge Seed

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

euler92();

Solution

// solution required

/section>