mirror of
https://github.com/seigler/advent-of-code-browser-console
synced 2025-07-26 00:06:10 +00:00
Day 6
This commit is contained in:
parent
8a24959a46
commit
e8320a1240
1 changed files with 1 additions and 0 deletions
1
day06.js
Normal file
1
day06.js
Normal file
|
@ -0,0 +1 @@
|
|||
let d=(document.body.textContent+`\n`).split`\n\n`,y=g=>[...new Set(g.replace(/\n/g,'').split``)];[d.reduce((a,g)=>a+y(g).length,0),d.reduce((a,g)=>a+y(g).filter(b=>g.split(b).length==g.split`\n`.length+1).length,0)]
|
Loading…
Add table
Add a link
Reference in a new issue