lua

lua,第1张

概述local address_num = 6 local recent_num = 6 local m_online_count_ = 20 local total = 6 local address = 0 local recent = 0 local online = 0 local address_flag = 0 local recent_flag = 0 local online_flag local address_num = 6 local recent_num = 6 local m_online_count_ = 20 local total = 6 local address = 0 local recent = 0 local online = 0 local address_flag = 0 local recent_flag = 0 local online_flag = 0 local res = {} res.a = 1 function select_num(depth,address_num,recent_num,m_online_count_,total ) if total == 0 then print("0 total " .. total.." address " ..address) table.insert(res,{address,recent,online}) return end if total >0 then if depth == 1 then for i = 0,6 do if address_num >=i then total = total - i print("1 total " .. total.." address " ..address) depth =  depth +1 select_num(depth,total ) end end end if depth == 2 then for i = 0,6 do if recent_num >=0 then total = total - i depth =  depth +1 select_num(depth,total ) end end end if depth ==3 then for i = 0,6 do if m_online_count_ >=0 then m_online_count_ = m_online_count_ - 2 online = online +2 total = total - 2 depth =  depth +1 select_num(depth,total ) end end end end select_num(0,6 ) 总结

以上是内存溢出为你收集整理的lua全部内容,希望文章能够帮你解决lua所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1266160.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存