Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Commit 1b8d28c

Browse files
alvinklQuincyLarson
authored andcommitted
feat(seed): Added more assertions for Project Euler (#16065)
1 parent 7086bf6 commit 1b8d28c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

challenges/08-coding-interview-questions-and-take-home-assignments/project-euler-problems.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,22 +1194,25 @@
11941194
"type": "bonfire",
11951195
"title": "Problem 39: Integer right triangles",
11961196
"tests": [
1197-
"assert.strictEqual(euler39(), 840, 'message: <code>euler39()</code> should return 840.');"
1197+
"assert(intRightTriangles(500) == 420, 'message: <code>intRightTriangles(500)</code> should return 420.');",
1198+
"assert(intRightTriangles(800) == 420, 'message: <code>intRightTriangles(800)</code> should return 420.');",
1199+
"assert(intRightTriangles(900) == 840, 'message: <code>intRightTriangles(900)</code> should return 840.');",
1200+
"assert(intRightTriangles(1000) == 840, 'message: <code>intRightTriangles(1000)</code> should return 840.');"
11981201
],
11991202
"solutions": [],
12001203
"translations": {},
12011204
"challengeSeed": [
1202-
"function euler39() {",
1205+
"function intRightTriangles(n) {",
12031206
" // Good luck!",
1204-
" return true;",
1207+
" return n;",
12051208
"}",
12061209
"",
1207-
"euler39();"
1210+
"intRightTriangles(1000);"
12081211
],
12091212
"description": [
12101213
"If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120.",
12111214
"{20,48,52}, {24,45,51}, {30,40,50}",
1212-
"For which value of p ≤ 1000, is the number of solutions maximised?"
1215+
"For which value of p ≤ n, is the number of solutions maximised?"
12131216
]
12141217
},
12151218
{

0 commit comments

Comments
 (0)