summaryrefslogtreecommitdiffstats
path: root/10.lua
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-05-14 19:51:41 -0500
committerJesse Luehrs <doy@tozt.net>2009-05-14 19:51:41 -0500
commitc3ff98ee4aa79bcaa07c8a478e96539c2a512e73 (patch)
tree0b1a04ee7e5b05ec23dcfa274d4258f8acbcdf9d /10.lua
parent394121b98178246a0b1063e9104f8878cf2a17e5 (diff)
downloadprojecteuler-c3ff98ee4aa79bcaa07c8a478e96539c2a512e73.tar.gz
projecteuler-c3ff98ee4aa79bcaa07c8a478e96539c2a512e73.zip
rename files for better sorting
Diffstat (limited to '10.lua')
-rw-r--r--10.lua21
1 files changed, 0 insertions, 21 deletions
diff --git a/10.lua b/10.lua
deleted file mode 100644
index cca16c1..0000000
--- a/10.lua
+++ /dev/null
@@ -1,21 +0,0 @@
-function isprime(n)
- if n < 2 then return false end
- if n == 2 then return true end
- if math.fmod(n, 2) == 0 then return false end
- for i = 3, math.ceil(math.sqrt(n)), 2 do
- if math.fmod(n, i) == 0 then return false end
- end
- return true
-end
-
-local i = 3
-local sum = 2
-while true do
- if i >= 1000000 then break end
- if isprime(i) then
- if sum + i < sum then print("overflow") end
- sum = sum + i
- end
- i = i + 2
-end
-print(sum)