mirror of
https://github.com/seigler/advent-of-code-browser-console
synced 2025-07-26 08:16:08 +00:00
2 lines
No EOL
204 B
JavaScript
2 lines
No EOL
204 B
JavaScript
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] |