mirror of
https://github.com/seigler/advent-of-code-browser-console
synced 2025-07-26 00:06:10 +00:00
day 1 improvement
This commit is contained in:
parent
5143f5c770
commit
ce2635f5c0
1 changed files with 1 additions and 1 deletions
|
@ -1 +1 @@
|
|||
d=$('pre').innerText.trim().split`\n`;t=(d,n)=>d.reduce((a,x,i)=>a+(+x>d[i-n]),0);[t(d,1),t(d,3)]
|
||||
d=$('pre').innerText.trim().split`\n`;[1,3].map(n=>d.reduce((a,x,i)=>a+(+x>d[i-n]),0))
|
Loading…
Add table
Add a link
Reference in a new issue