加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

lua

发布时间:2020-12-14 22:19:28 所属栏目:大数据 来源:网络整理
导读: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
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 )

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读