summary refs log tree commit diff stats
path: root/2022/day-01/day-01.raku
diff options
context:
space:
mode:
Diffstat (limited to '2022/day-01/day-01.raku')
-rw-r--r--2022/day-01/day-01.raku7
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;