Something went wrong. Try again.
Code for the Advent of Code event
aoc advent-of-code
Something went wrong. Try again.
175 B · 5 lines
at rust
123456#!/usr/bin/env crystal
nums = ARGF.each_line.map(&.to_i).to_aputs nums.each.cons_pair.count { |a, b| a < b }puts nums.each_cons(3).cons_pair.count { |a, b| a.sum < b.sum }