diff --git a/.replit b/.replit index f463f3c..50fa692 100644 --- a/.replit +++ b/.replit @@ -1,2 +1 @@ -language = "nodejs" -run = "node day04" \ No newline at end of file +language = 'nodejs'; diff --git a/2022/day01.js b/2022/day01.js new file mode 100644 index 0000000..4883c83 --- /dev/null +++ b/2022/day01.js @@ -0,0 +1 @@ +[a,b,c]=$("pre").innerText.trim().split`\n\n`.map(x=>x.split`\n`.reduce((a,c)=>a+(+c),0)).sort((a,b)=>b-a);[a,a+b+c] \ No newline at end of file