1
0
Fork 0

Initial commit

This commit is contained in:
Sijmen 2022-12-01 15:48:20 +01:00
commit c1db9c86f1
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

5
day01.rb Normal file
View file

@ -0,0 +1,5 @@
input = STDIN.read.split "\n\n"
elves = input.map { |elf| elf.split("\n").map(&:to_i).sum }
puts "Part 1: #{elves.max}"
puts "Part 2: #{elves.sort.last(3).sum}"