selected = { };
math . random(0,# arg);
math . random seed(OS . time());
if # arg & lt=count然後返回unpack(arg)end
while #selected <伯爵do
math . random(# arg);
table . insert(selected,table . remove(arg,math . random(# arg));
結束
返回解包(已選擇);
結束
打印(選擇數字(3,1,2,3,4,5,6,7))