advent-of-code/2023/11/main-2.rb
2023-12-10 22:04:30 -08:00

14 lines
255 B
Ruby
Executable file

#!/usr/bin/env ruby
# frozen_string_literal: true
# decidedly mozzarella flavored
`make main-1`
file_name = 'data.txt'
base = Integer(`./main-1 DONTWORK < #{file_name}`)
plus1 = Integer(`./main-1 < #{file_name}`)
puts base + (plus1 - base) * 999_999