Something went wrong. Try again.
Code for the Advent of Code event
aoc advent-of-code
Something went wrong. Try again.
164 B · 5 lines
Ruby
at rust
123456#!/usr/bin/env ruby# frozen_string_literal: true
input = ARGF.readlines.map &:to_iputs [2, 3].map { |s| input.combination(s).find { _1.sum == 2020 }.reduce :* }