Skip to content

Instantly share code, notes, and snippets.

View ricardo-benicio's full-sized avatar

Ricardo Benicio ricardo-benicio

View GitHub Profile
@ricardo-benicio
ricardo-benicio / day2.rb
Last active January 31, 2024 16:53
Advent of Code 2023
input = <<~INPUT
Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green
Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue
Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red
Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red
Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green
INPUT
class Game
attr_reader :id, :rounds
@ricardo-benicio
ricardo-benicio / day1.rb
Created January 31, 2024 16:48
Advent of Code 2023
puts 'Day-1'
# Part 1
input = <<~INPUT
1abc2
pqr3stu8vwx
a1b2c3d4e5f
treb7uchet
INPUT