freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/project-euler/problem-40-champernownes-co...

966 B

id challengeType title videoUrl localeTitle
5900f3941000cf542c50fea7 5 Problem 40: Champernowne"s constant

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert.strictEqual(champernownesConstant(100), 5, "<code>champernownesConstant(100)</code> should return 5.");'
  - text: ''
    testString: 'assert.strictEqual(champernownesConstant(1000), 15, "<code>champernownesConstant(1000)</code> should return 15.");'
  - text: ''
    testString: 'assert.strictEqual(champernownesConstant(1000000), 210, "<code>champernownesConstant(1000000)</code> should return 210.");'

Challenge Seed

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

champernownesConstant(100);

Solution

// solution required