From b1692f98b614e731cd42fc770dff77e2f3c136ff Mon Sep 17 00:00:00 2001 From: Nat Lasseter Date: Sun, 1 Dec 2019 11:15:09 +0000 Subject: Day 1 complete --- day01/part1 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 day01/part1 (limited to 'day01/part1') diff --git a/day01/part1 b/day01/part1 new file mode 100755 index 0000000..6d82338 --- /dev/null +++ b/day01/part1 @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby + +input = $stdin.readlines.map(&:strip).map(&:to_i) + +puts input.map{ |x| (x / 3) - 2 }.sum -- cgit v1.2.3