59 lines
966 B
Markdown
59 lines
966 B
Markdown
|
---
|
||
|
id: 5900f3941000cf542c50fea7
|
||
|
challengeType: 5
|
||
|
title: 'Problem 40: Champernowne"s constant'
|
||
|
videoUrl: ''
|
||
|
localeTitle: ''
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
undefined
|
||
|
|
||
|
## Instructions
|
||
|
undefined
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
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.");'
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='js-seed'>
|
||
|
|
||
|
```js
|
||
|
function champernownesConstant(n) {
|
||
|
// Good luck!
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
champernownesConstant(100);
|
||
|
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
</section>
|