摘要: 解答: 抽签,5个人抽取5根签,只有一个签为中签。每个人概率为1/5.将这n个元素依次遍历,每次得到的数(第L个)取随机数r,r%L==0(0-L之内)var pickOne(file){ int lenth = 1; while(lenth <= file.size){ if(rand... 阅读全文
posted @ 2015-11-28 00:00 pandans 阅读(1005) 评论(0) 推荐(0) 编辑