feat(seed): Added more assertions for Project Euler Problem (#15950)
This commit is contained in:
committed by
mrugesh mohapatra
parent
524918fc84
commit
0ee6572a86
@ -921,17 +921,20 @@
|
||||
"type": "bonfire",
|
||||
"title": "Problem 29: Distinct powers",
|
||||
"tests": [
|
||||
"assert.strictEqual(euler29(), 9183, 'message: <code>euler29()</code> should return 9183.');"
|
||||
"assert.strictEqual(distinctPowers(15), 177, 'message: <code>distinctPowers(15)</code> should return 177.');",
|
||||
"assert.strictEqual(distinctPowers(20), 324, 'message: <code>distinctPowers(20)</code> should return 324.');",
|
||||
"assert.strictEqual(distinctPowers(25), 519, 'message: <code>distinctPowers(25)</code> should return 519.');",
|
||||
"assert.strictEqual(distinctPowers(30), 755, 'message: <code>distinctPowers(30)</code> should return 755.');"
|
||||
],
|
||||
"solutions": [],
|
||||
"translations": {},
|
||||
"challengeSeed": [
|
||||
"function euler29() {",
|
||||
"function distinctPowers(n) {",
|
||||
" // Good luck!",
|
||||
" return true;",
|
||||
" return n;",
|
||||
"}",
|
||||
"",
|
||||
"euler29();"
|
||||
"distinctPowers(30);"
|
||||
],
|
||||
"description": [
|
||||
"Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:",
|
||||
@ -941,7 +944,7 @@
|
||||
"52=25, 53=125, 54=625, 55=3125",
|
||||
"If they are then placed in numerical order, with any repeats removed, we get the following sequence of 15 distinct terms:",
|
||||
"4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125",
|
||||
"How many distinct terms are in the sequence generated by ab for 2 ≤ a ≤ 100 and 2 ≤ b ≤ 100?"
|
||||
"How many distinct terms are in the sequence generated by ab for 2 ≤ a ≤ n and 2 ≤ b ≤ n?"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user