feat(seed): Added more assertions for Project Euler Problem (#15953)

This commit is contained in:
Alvin Kristanto
2017-12-26 16:40:39 +07:00
committed by mrugesh mohapatra
parent ffc03dcdf6
commit 3d3a3343ba

View File

@ -984,24 +984,27 @@
"type": "bonfire",
"title": "Problem 31: Coin sums",
"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": [],
"translations": {},
"challengeSeed": [
"function euler31() {",
"function coinSums(n) {",
" // Good luck!",
" return true;",
" return n;",
"}",
"",
"euler31();"
"coinSums(200);"
],
"description": [
"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).",
"It is possible to make £2 in the following way:",
"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?"
]
},
{