diff --git a/lua/src/p0034.lua b/lua/src/p0034.lua index 828103c2..f444dd9c 100644 --- a/lua/src/p0034.lua +++ b/lua/src/p0034.lua @@ -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 diff --git a/lua/src/p0076.lua b/lua/src/p0076.lua index 6c551c24..1c0f8724 100644 --- a/lua/src/p0076.lua +++ b/lua/src/p0076.lua @@ -25,7 +25,7 @@ return { counts[i] = 0 end - counts[2] = 0 + counts[2] = 100 while counts[100] == 0 do