Feat: add new Markdown parser (#39800)

and change all the challenges to new `md` format.
This commit is contained in:
Oliver Eyton-Williams
2020-11-27 19:02:05 +01:00
committed by GitHub
parent a07f84c8ec
commit 0bd52f8bd1
2580 changed files with 113436 additions and 111979 deletions

View File

@ -1,44 +1,31 @@
---
id: 5900f45f1000cf542c50ff71
challengeType: 5
title: 'Problem 242: Odd Triplets'
challengeType: 5
forumTopicId: 301889
---
## Description
<section id='description'>
Given the set {1,2,...,n}, we define f(n,k) as the number of its k-element subsets with an odd sum of elements. For example, f(5,3)=4, since the set {1,2,3,4,5} has four 3-element subsets having an odd sum of elements, i.e.: {1,2,4}, {1,3,5}, {2,3,4} and {2,4,5}.
# --description--
When all three values n, k and f(n,k) are odd, we say that they make
an odd-triplet [n,k,f(n,k)].
Given the set {1,2,...,n}, we define f(n,k) as the number of its k-element subsets with an odd sum of elements. For example, f(5,3) = 4, since the set {1,2,3,4,5} has four 3-element subsets having an odd sum of elements, i.e.: {1,2,4}, {1,3,5}, {2,3,4} and {2,4,5}.
There are exactly five odd-triplets with n10, namely:
[1,1,f(1,1)=1], [5,1,f(5,1)=3], [5,5,f(5,5)=1], [9,1,f(9,1)=5] and [9,9,f(9,9)=1].
When all three values n, k and f(n,k) are odd, we say that they make an odd-triplet \[n,k,f(n,k)].
How many odd-triplets are there with n1012?
</section>
There are exactly five odd-triplets with n ≤ 10, namely: \[1,1,f(1,1) = 1], \[5,1,f(5,1) = 3], \[5,5,f(5,5) = 1], \[9,1,f(9,1) = 5] and \[9,9,f(9,9) = 1].
## Instructions
<section id='instructions'>
How many odd-triplets are there with n ≤ 1012 ?
</section>
# --hints--
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler242()</code> should return 997104142249036700.
testString: assert.strictEqual(euler242(), 997104142249036700);
`euler242()` should return 997104142249036700.
```js
assert.strictEqual(euler242(), 997104142249036700);
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
## --seed-contents--
```js
function euler242() {
@ -49,17 +36,8 @@ function euler242() {
euler242();
```
</div>
</section>
## Solution
<section id='solution'>
# --solutions--
```js
// solution required
```
</section>