Something went wrong. Try again.
Code for the Advent of Code event
aoc advent-of-code
Something went wrong. Try again.
233 B · 7 lines
Ruby
at rust
12345678#!/usr/bin/env ruby# frozen_string_literal: true
input = ARGF.readline.chomp.chars
puts input.each_cons(4).with_index.find { _1[0].uniq.size == 4 }[1] + 4puts input.each_cons(14).with_index.find { _1[0].uniq.size == 14 }[1] + 14