feat(seed): Added more assertions for Project Euler Problem (#15953)
This commit is contained in:
committed by
mrugesh mohapatra
parent
ffc03dcdf6
commit
3d3a3343ba
@ -984,24 +984,27 @@
|
|||||||
"type": "bonfire",
|
"type": "bonfire",
|
||||||
"title": "Problem 31: Coin sums",
|
"title": "Problem 31: Coin sums",
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert.strictEqual(euler31(), 73682, 'message: <code>euler31()</code> should return 73682.');"
|
"assert(coinSums(50) == 451, 'message: <code>coinSums(50)</code> should return 451.');",
|
||||||
|
"assert(coinSums(100) == 4563, 'message: <code>coinSums(100)</code> should return 4563.');",
|
||||||
|
"assert(coinSums(150) == 21873, 'message: <code>coinSums(150)</code> should return 21873.');",
|
||||||
|
"assert(coinSums(200) == 73682, 'message: <code>coinSums(200)</code> should return 73682.');"
|
||||||
],
|
],
|
||||||
"solutions": [],
|
"solutions": [],
|
||||||
"translations": {},
|
"translations": {},
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"function euler31() {",
|
"function coinSums(n) {",
|
||||||
" // Good luck!",
|
" // Good luck!",
|
||||||
" return true;",
|
" return n;",
|
||||||
"}",
|
"}",
|
||||||
"",
|
"",
|
||||||
"euler31();"
|
"coinSums(200);"
|
||||||
],
|
],
|
||||||
"description": [
|
"description": [
|
||||||
"In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:",
|
"In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:",
|
||||||
"1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).",
|
"1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).",
|
||||||
"It is possible to make £2 in the following way:",
|
"It is possible to make £2 in the following way:",
|
||||||
"1×£1 + 1×50p + 2×20p + 1×5p + 1×2p + 3×1p",
|
"1×£1 + 1×50p + 2×20p + 1×5p + 1×2p + 3×1p",
|
||||||
"How many different ways can £2 be made using any number of coins?"
|
"How many different ways can £(n) be made using any number of coins?"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user