Skip to content
Sign UpLog In
Profile icon

Matthew Doan

@MatthewDoan3
I love Xin Zhao
Repls
Community
MatthewDoan3
MatthewDoan3
shared a Post
2 years ago
Advent of Code 1 Walkthrough
Intro Hey guys! This is Matthew. You might know me from my old Repl.it account, MatthewDoan1, but sadly I can't log into it anymore because my school
AOC 1
Python
grrlic
grrlic
I like your approach for the part 2!2 years ago
RayhanADev
RayhanADev
Nice! I did it quite similarly except in JS last night: let expenses = [long list of expenses]; function part1() { let cash = 0; expenses.forEach(expense => { let cash = 2020 - expense; if (expenses.includes(cash)) { console.log(Pair Found: ${cash} & ${expense}); console.log(Product is: ${cash * expense}); } }); } function part2() { let cash = 0; expenses.forEach(expense => { expenses.forEach(expense2 => { let cash = 2020 - expense - expense2; if (expenses.includes(ca2 years ago
AmethystMoon1
AmethystMoon1
Heh, you did it the smart way. I just brute forced it.2 years ago