-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52ca506
commit 2b175d4
Showing
3 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
/** | ||
* Project Euler Problem 1 | ||
* | ||
* Did this the old fashioned way, because this was before I figured out the closed form solution | ||
* | ||
* Problem: | ||
* | ||
* If we list all the natural numbers below 10 that are multiples of 3 or 5, we | ||
* get 3, 5, 6 and 9. The sum of these multiples is 23. | ||
* | ||
* Find the sum of all the multiples of 3 or 5 below 1000. | ||
*/ | ||
* Project Euler Problem 1 | ||
* | ||
* Did this the old fashioned way, because this was before I figured out the closed form solution | ||
* | ||
* Problem: | ||
* | ||
* If we list all the natural numbers below 10 that are multiples of 3 or 5, we | ||
* get 3, 5, 6 and 9. The sum of these multiples is 23. | ||
* | ||
* Find the sum of all the multiples of 3 or 5 below 1000. | ||
* | ||
* @returns {number} | ||
Check failure on line 13 in javascript/p0001.js GitHub Actions / javascript-lint
|
||
*/ | ||
exports.p0001 = function() { | ||
let answer = 0; | ||
for (let i = 3; i < 1000; i += 3) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
* | ||
* By considering the terms in the Fibonacci sequence whose values do not exceed | ||
* four million, find the sum of the even-valued terms. | ||
* | ||
* @returns {number} | ||
Check failure on line 16 in javascript/p0002.js GitHub Actions / javascript-lint
|
||
**/ | ||
exports.p0002 = function() { | ||
// for a proof on why this formulation works, see python/p0002.py | ||
|