13 lines
210 B
Lua
Executable File
13 lines
210 B
Lua
Executable File
#!/usr/bin/env luajit
|
|
|
|
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)
|