freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-164-numbers-for-which-no-three-consecutive-digits-have-a-sum-greater-than-a-given-value.english.md
mrugesh 22afc2a0ca feat(learn): python certification projects (#38216)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Beau Carnes <beaucarnes@gmail.com>
2020-05-27 13:19:08 +05:30

882 B

id, challengeType, isHidden, title, forumTopicId
id challengeType isHidden title forumTopicId
5900f4111000cf542c50ff23 5 false Problem 164: Numbers for which no three consecutive digits have a sum greater than a given value 301798

Description

How many 20 digit numbers n (without any leading zero) exist such that no three consecutive digits of n have a sum greater than 9?

Instructions

Tests

tests:
  - text: <code>euler164()</code> should return 378158756814587.
    testString: assert.strictEqual(euler164(), 378158756814587);

Challenge Seed

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

euler164();

Solution

// solution required