Feat: add new Markdown parser (#39800)
and change all the challenges to new `md` format.
This commit is contained in:
committed by
GitHub
parent
a07f84c8ec
commit
0bd52f8bd1
@ -1,56 +1,47 @@
|
||||
---
|
||||
id: 5900f3ba1000cf542c50fecd
|
||||
challengeType: 5
|
||||
title: 'Problem 78: Coin partitions'
|
||||
challengeType: 5
|
||||
forumTopicId: 302191
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
# --description--
|
||||
|
||||
Let p(n) represent the number of different ways in which n coins can be separated into piles. For example, five coins can be separated into piles in exactly seven different ways, so p(5)=7.
|
||||
|
||||
<div style='text-align: center;'>
|
||||
|
||||
|Coin piles|
|
||||
|--- |
|
||||
|OOOOO|
|
||||
|OOOO O|
|
||||
|OOO OO|
|
||||
|OOO O O|
|
||||
|OO OO O|
|
||||
|OO O O O|
|
||||
|O O O O O|
|
||||
| Coin piles |
|
||||
| ----------------- |
|
||||
| OOOOO |
|
||||
| OOOO O |
|
||||
| OOO OO |
|
||||
| OOO O O |
|
||||
| OO OO O |
|
||||
| OO O O O |
|
||||
| O O O O O |
|
||||
|
||||
</div>
|
||||
|
||||
Find the least value of <var>n</var> for which p(<var>n</var>) is divisible by one million.
|
||||
Find the least value of `n` for which p(`n`) is divisible by one million.
|
||||
|
||||
</section>
|
||||
# --hints--
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: <code>coinPartitions()</code> should return a number.
|
||||
testString: assert(typeof coinPartitions() === 'number');
|
||||
- text: <code>coinPartitions()</code> should return 55374.
|
||||
testString: assert.strictEqual(coinPartitions(), 55374);
|
||||
`coinPartitions()` should return a number.
|
||||
|
||||
```js
|
||||
assert(typeof coinPartitions() === 'number');
|
||||
```
|
||||
|
||||
</section>
|
||||
`coinPartitions()` should return 55374.
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
```js
|
||||
assert.strictEqual(coinPartitions(), 55374);
|
||||
```
|
||||
|
||||
<div id='js-seed'>
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function coinPartitions() {
|
||||
@ -61,17 +52,8 @@ function coinPartitions() {
|
||||
coinPartitions();
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
# --solutions--
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user