first commit

This commit is contained in:
fzorb 2025-05-01 12:38:17 +03:00
commit 31bda4481f
37 changed files with 4645 additions and 0 deletions

21
2024/one/one.lua Normal file
View file

@ -0,0 +1,21 @@
a = {}
b = {}
s = 0
n = 6
for i=1,n*2 do
if i % 2 == 1 then
table.insert(a, io.read("*n"))
else
table.insert(b, io.read("*n"))
end
end
table.sort(a)
table.sort(b)
for i=1, n do
s = s + math.abs(a[i] - b[i])
end
print(s)