diff --git a/day01/solution.rb b/day01/solution.rb new file mode 100644 index 0000000..ec1b41c --- /dev/null +++ b/day01/solution.rb @@ -0,0 +1,5 @@ +#!/bin/env ruby +# Sum all numbers in the text file. + +# Part 1 +sum = File.readlines('./input').map { |line| line.to_i)}.sum