diff --git a/day05.js b/day05.js new file mode 100644 index 0000000..bb6c85f --- /dev/null +++ b/day05.js @@ -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] \ No newline at end of file