mirror of
https://github.com/seigler/advent-of-code-browser-console
synced 2025-07-27 00:26:10 +00:00
one big repo for all years
This commit is contained in:
parent
4e1cd98bf1
commit
ccc3cdba3a
9 changed files with 0 additions and 0 deletions
1
2020/day01.js
Normal file
1
2020/day01.js
Normal file
|
@ -0,0 +1 @@
|
|||
let d=document.body.textContent.trim().split('\n').map(a=>parseInt(a)),s=0,f=(a,b,c=2)=>{for(let e,g,h=0;h<d.length;e=d[h++])if(2<c){if(g=f(a+1,b-e,c-1),g)return e*g;}else if(d.includes(b-e))return e*(b-e)};[f(0,2020),f(0,2020,3)]
|
Loading…
Add table
Add a link
Reference in a new issue