Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-78-coin-partitions.english.md
Oliver Eyton-Williams bd68b70f3d Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2020-09-03 15:07:40 -07:00

78 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f3ba1000cf542c50fecd
challengeType: 5
title: 'Problem 78: Coin partitions'
forumTopicId: 302191
---
## Description
<section id='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|
</div>
Find the least value of <var>n</var> for which p(<var>n</var>) is divisible by one million.
</section>
## 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);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function coinPartitions() {
// Good luck!
return true;
}
coinPartitions();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>