Skip to content

Commit

Permalink
fix some logic errors
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Sep 9, 2024
1 parent f9ed1bf commit 3851ca2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/src/p0034.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ return {
local sum = 0
for i = 1,string.len(xs),1
do
sum = sum + factorial(tonumber(xs[i]))
sum = sum + factorial(tonumber(xs:sub(i, i)))
end

if sum == x
Expand Down
2 changes: 1 addition & 1 deletion lua/src/p0076.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ return {
counts[i] = 0
end

counts[2] = 0
counts[2] = 100

while counts[100] == 0
do
Expand Down

0 comments on commit 3851ca2

Please sign in to comment.