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.1 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f3901000cf542c50fea3 问题36双基回文 5 problem-36-double-base-palindromes

--description--

十进制数585 = 10010010012二进制在两个碱基中都是回文。找到所有数字的总和小于n而1000 <= n <= 1000000它们在基数10和基数2中是回文的。请注意任一基数中的回文数可能不包括前导零。

--hints--

doubleBasePalindromes(1000)应该返回1772。

assert(doubleBasePalindromes(1000) == 1772);

doubleBasePalindromes(50000)应该返回105795。

assert(doubleBasePalindromes(50000) == 105795);

doubleBasePalindromes(500000)应该返回286602。

assert(doubleBasePalindromes(500000) == 286602);

doubleBasePalindromes(1000000)应该返回872187。

assert(doubleBasePalindromes(1000000) == 872187);

--seed--

--seed-contents--

function doubleBasePalindromes(n) {

  return n;
}

doubleBasePalindromes(1000000);

--solutions--

// solution required