Forgot to commit the last few days

This commit is contained in:
2025-12-12 06:23:45 +01:00
parent 50ca045070
commit ff3a3309a2
14 changed files with 1850 additions and 2 deletions

24
2025/Day10/Day10.lua Normal file
View File

@@ -0,0 +1,24 @@
-- Advent of Code 2025 - Day 10 - Bas Grolleman
require("functions")
local filename = "Day10/test"
print("Day 10")
local input = {}
for line in io.lines(filename) do
local switches = string.match(line, "%[([#.]+)%]")
local buttons = {}
for b in string.gmatch(line, "%(([%d,]+)%)") do
local sw = {}
for j in string.gmatch(b, "%d+") do
table.insert(sw, tonumber(j))
end
table.insert(buttons, sw)
end
table.insert(input, {
switches = switches,
buttons = buttons,
})
end
print_table(input)