Code for the Advent of Code event
aoc advent-of-code
at main 18 lines 282 B view raw
1local input = io.open("input.txt", "r") 2 3local floor = 0 4 5local char 6 7repeat 8 char = input:read(1) 9 if char == "(" then 10 floor = floor + 1 11 elseif char == ")" then 12 floor = floor - 1 13 end 14until not char 15 16print("Santa is on floor " .. floor) 17 18input:close()