diff options
author | Andinus <andinus@nand.sh> | 2022-12-01 13:53:24 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2022-12-01 13:53:24 +0530 |
commit | 2cb4ddc5393f67ff53d991c76f938dd06fc7bf93 (patch) | |
tree | 87a75c69f4bdfb47e6ffd5cffeba0f396a0a9e1c /2022/day-01/day-01.raku | |
parent | 72984202e1da518ee4b3201369ed50699bb840b0 (diff) | |
download | aoc-2cb4ddc5393f67ff53d991c76f938dd06fc7bf93.tar.gz |
I'll add readme later.
Diffstat (limited to '2022/day-01/day-01.raku')
-rw-r--r-- | 2022/day-01/day-01.raku | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/2022/day-01/day-01.raku b/2022/day-01/day-01.raku new file mode 100644 index 0000000..cbe8b92 --- /dev/null +++ b/2022/day-01/day-01.raku @@ -0,0 +1,7 @@ +#!/usr/bin/env raku + +# @calories records calories carried by each Elf, sorted. +my Int @calories = "input".IO.split("\n\n").map(*.lines.sum).sort; + +put "Part 1: " ~ @calories.tail; +put "Part 2: " ~ @calories.tail(3).sum; |