feat(seed): Change Project Euler assertion (#16021)
This commit is contained in:
committed by
Quincy Larson
parent
c9237c4a16
commit
b64f642187
@ -1033,21 +1033,23 @@
|
|||||||
"type": "bonfire",
|
"type": "bonfire",
|
||||||
"title": "Problem 34: Digit factorials",
|
"title": "Problem 34: Digit factorials",
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert.strictEqual(euler34(), 40730, 'message: <code>euler34()</code> should return 40730.');"
|
"assert.deepEqual(digitFactorial(), { sum: 40730, numbers: [145, 40585] }, 'message: <code>digitFactorial()</code> should return { sum: 40730, numbers: [145, 40585] }.');"
|
||||||
],
|
],
|
||||||
"solutions": [],
|
"solutions": [],
|
||||||
"translations": {},
|
"translations": {},
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"function euler34() {",
|
"function digitFactorial() {",
|
||||||
" // Good luck!",
|
" // Good luck!",
|
||||||
" return true;",
|
" var sum = 0;",
|
||||||
|
" var numbers = [];",
|
||||||
|
" return { sum, numbers };",
|
||||||
"}",
|
"}",
|
||||||
"",
|
"",
|
||||||
"euler34();"
|
"digitFactorial();"
|
||||||
],
|
],
|
||||||
"description": [
|
"description": [
|
||||||
"145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.",
|
"145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.",
|
||||||
"Find the sum of all numbers which are equal to the sum of the factorial of their digits.",
|
"Find the numbers and the sum of the numbers which are equal to the sum of the factorial of their digits.",
|
||||||
"Note: as 1! = 1 and 2! = 2 are not sums they are not included."
|
"Note: as 1! = 1 and 2! = 2 are not sums they are not included."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user