mirror of
https://github.com/seigler/advent-of-code-browser-console
synced 2025-07-27 00:26:10 +00:00
Days 1-3
This commit is contained in:
commit
46ae00bccc
3 changed files with 5 additions and 0 deletions
2
day03.js
Normal file
2
day03.js
Normal file
|
@ -0,0 +1,2 @@
|
|||
let d=document.body.textContent.trim().split(`
|
||||
`);let t=(X,Y)=>{let c=0;for(let y=0,x=0;y<d.length;){c+=d[y][x%d[0].length]=='#'?1:0;x+=X;y+=Y}return c};[t(3,1),t(1,1)*t(3,1)*t(5,1)*t(7,1)*t(1,2)];
|
Loading…
Add table
Add a link
Reference in a new issue