advent-of-code/2023/11/main-2.rb

14 lines
255 B
Ruby
Raw Normal View History

#!/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