feat(seed): Added more assertion for Project Euler problem twe (#15874)
This commit is contained in:
committed by
Quincy Larson
parent
fbce073fb2
commit
b278a59139
@ -760,17 +760,20 @@
|
|||||||
"type": "bonfire",
|
"type": "bonfire",
|
||||||
"title": "Problem 25: 1000-digit Fibonacci number",
|
"title": "Problem 25: 1000-digit Fibonacci number",
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert.strictEqual(euler25(), 4782, 'message: <code>euler25()</code> should return 4782.');"
|
"assert(digitFibonacci(5) == 20, 'message: <code>digitFibonacci(5)</code> should return 20.');",
|
||||||
|
"assert(digitFibonacci(10) == 44, 'message: <code>digitFibonacci(10)</code> should return 44.');",
|
||||||
|
"assert(digitFibonacci(15) == 68, 'message: <code>digitFibonacci(15)</code> should return 68.');",
|
||||||
|
"assert(digitFibonacci(20) == 92, 'message: <code>digitFibonacci(20)</code> should return 92.');"
|
||||||
],
|
],
|
||||||
"solutions": [],
|
"solutions": [],
|
||||||
"translations": {},
|
"translations": {},
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"function euler25() {",
|
"function digitFibonacci(n) {",
|
||||||
" // Good luck!",
|
" // Good luck!",
|
||||||
" return true;",
|
" return n;",
|
||||||
"}",
|
"}",
|
||||||
"",
|
"",
|
||||||
"euler25();"
|
"digitFibonacci(20);"
|
||||||
],
|
],
|
||||||
"description": [
|
"description": [
|
||||||
"The Fibonacci sequence is defined by the recurrence relation:",
|
"The Fibonacci sequence is defined by the recurrence relation:",
|
||||||
@ -789,7 +792,7 @@
|
|||||||
"F11 = 89",
|
"F11 = 89",
|
||||||
"F12 = 144",
|
"F12 = 144",
|
||||||
"The 12th term, F12, is the first term to contain three digits.",
|
"The 12th term, F12, is the first term to contain three digits.",
|
||||||
"What is the index of the first term in the Fibonacci sequence to contain 1000 digits?"
|
"What is the index of the first term in the Fibonacci sequence to contain n digits?"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user