Created
December 3, 2020 04:34
-
-
Save AdamMescher/5644f89fec7d1e03974d2e1af7b32409 to your computer and use it in GitHub Desktop.
2020 Advent of Code Day 01 Part 2 Solution in JavaScript
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
for (let i = 0; i < input.length; i++) { | |
for (let j = 0; j < input.length; j++) { | |
for (let k = 0; k < input.length; k++) { | |
if(input[i] + input[j] + input[k] === 2020) { | |
console.log(`Output: ${input[i] * input[j] * input[k]}`) | |
break | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment