Created
April 29, 2020 21:25
-
-
Save gavinsykes/679d5ba6c859e582e07e255034c4feb1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const euler_1 = n => { | |
| let result = 0, | |
| x = n/3, | |
| y = n/5 | |
| for (let i = 1; i < x; i++) { | |
| result += i*3; | |
| } | |
| for (let i = 1; i < x; i++) { | |
| if (5*i % 3 != 0) { | |
| result += i*5; | |
| } | |
| } | |
| return result; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment