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 cc2d26f commit 2495a82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lua/src/p0004.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ return {
local p = u * v
local ps = tostring(p)

if ps == ps.reverse() and p > answer
if ps == string.reverse(ps) and p > answer
then
answer = p
end
Expand Down
3 changes: 1 addition & 2 deletions lua/src/p0034.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ return {
do
local xs = tostring(x)
local sum = 0

for i = 1,xs.len(),1
for i = 1,len(xs),1
do
sum = sum + factorial(tonumber(xs[i]))
end
Expand Down
5 changes: 2 additions & 3 deletions lua/src/p0076.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ return {
idx = 2

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

for i = (idx - 1),101,1
do
Expand Down

0 comments on commit 2495a82

Please sign in to comment.