Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Sep 9, 2024
1 parent 3911420 commit cc2d26f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lua/src/p0034.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
--
-- Note: as 1! = 1 and 2! = 2 are not sums they are not included.

local factorial = loadfile('src/lib/math.lua')().factorial

return {
solution = function()
local answer = 0
Expand All @@ -36,5 +38,3 @@ return {
return answer
end
}

local factorial = loadfile('src/lib/math.lua')().factorial
6 changes: 2 additions & 4 deletions lua/src/p0076.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@
--
-- Note: as 1! = 1 and 2! = 2 are not sums they are not included.

local factorial = loadfile('src/lib/math.lua')().factorial

return {
solution = function()
local answer = 0
local idx = 0
local idx
local sum = 100
local counts = {}

Expand All @@ -36,7 +34,7 @@ return {
then
answer = answer + (100 + counts[2 + 1] - sum) / 2
idx = 2

repeat
idx = idx + 1
counts[idx] = 0 -- please remember lua is 1-indexed
Expand Down

0 comments on commit cc2d26f

Please sign in to comment.