adventofcode-2021/day00/part1.lua

11 lines
224 B
Lua
Raw Normal View History

2021-12-05 12:17:39 +01:00
#!/usr/bin/env luajit
2021-11-30 22:49:02 +01:00
io.input(arg[3])
local min, max = math.huge, -math.huge
for i = 1, io.read("*n") do
local num = io.read("*n")
max = math.max(num, max)
min = math.min(num, min)
end
print(min .. " " .. max)