local t=os.clock()
for i=5,10000000 do
local num=1
local numb={}
for j=2,math.ceil(i/2)-1 do
if math.floor(i/j)==i/j then
local co=true
for k,v in pairs(numb) do
if i/j==v then
co=false
--print(numb,i/j)
end
end
if co then
num = num + j +i/j
numb[#numb+1] = j
end
--print(j,i/j)
end
end
if math.floor(num)==i then
print(i.." 用时:"..os.clock()-t.."s")
end
collectgarbage()
end
for i=5,10000000 do
local num=1
local numb={}
for j=2,math.ceil(i/2)-1 do
if math.floor(i/j)==i/j then
local co=true
for k,v in pairs(numb) do
if i/j==v then
co=false
--print(numb,i/j)
end
end
if co then
num = num + j +i/j
numb[#numb+1] = j
end
--print(j,i/j)
end
end
if math.floor(num)==i then
print(i.." 用时:"..os.clock()-t.."s")
end
collectgarbage()
end