level 4
local t = {333,342,3,22,39,55,67,80,99}
function sort(t)
return t
end
2017年06月02日 13点06分
1
level 6
function sort(t)
return table.sort(t)
end
2017年06月02日 16点06分
2
不用 table.sort(),要自己写一个
2017年06月02日 23点06分
level 6
function maxnum(a)
local mi=1
local m=a[mi]
for i,v in ipairs(a)do
if v>m then
mi=i
m=v
end
end
return mi,m
end
print(maxnum({1,2,10,3}))
2017年06月02日 23点06分
4
你这是取最大 不是快排
2017年06月08日 07点06分
回复 协调意志_Tox :i know
2017年06月08日 07点06分