Something went wrong. Try again.
Code for the Advent of Code event
aoc advent-of-code
Something went wrong. Try again.
191 B · 8 lines
Ruby
at rust
123456789#!/usr/bin/env ruby# frozen_string_literal: true
ids = ARGF.readlines.map { |l| l.tr('FBLR', '0101').to_i 2 }min, max = ids.minmax
puts maxputs (min..max).find { |id| !ids.include? id }