mirror of
https://github.com/seigler/advent-of-code-browser-console
synced 2025-07-26 00:06:10 +00:00
day 5
This commit is contained in:
parent
b049e03329
commit
e353642348
1 changed files with 2 additions and 0 deletions
2
day05.js
Normal file
2
day05.js
Normal file
|
@ -0,0 +1,2 @@
|
|||
let d=document.body.textContent.replaceAll(/[FL]/g,0).replaceAll(/[BR]/g,1).trim().split`
|
||||
`.map(c=>parseInt(c.slice(0,7),2)*8+parseInt(c.slice(7),2)).sort((a,b)=>b-a);[d[0],d.find((s,i,S)=>s-S[i+1]==2)-1]
|
Loading…
Add table
Add a link
Reference in a new issue