This commit is contained in:
Felix Van der Jeugt 2021-12-01 08:03:56 +01:00
parent 9aa652953c
commit 9a85919a6f
No known key found for this signature in database
GPG Key ID: 58B209295023754D
4 changed files with 2030 additions and 0 deletions

10
Day01/Part1.lua Normal file
View File

@ -0,0 +1,10 @@
local count = 0
local previous
for number in io.lines(arg[3]) do
number = tonumber(number)
if previous ~= nil and previous < number then
count = count + 1
end
previous = number
end
print(count)

10
Day01/Part2.lua Normal file
View File

@ -0,0 +1,10 @@
local count = 0
local a, b, c
for line in io.lines(arg[3]) do
d = tonumber(line)
if a ~= nil and a + b + c < b + c + d then
count = count + 1
end
a, b, c = b, c, d
end
print(count)

2000
inputs/01.long Normal file

File diff suppressed because it is too large Load Diff

10
inputs/01.short Normal file
View File

@ -0,0 +1,10 @@
199
200
208
210
200
207
240
269
260
263