import?java.util.List;
import?java.util.Random;
public?class?Test?{
public?static?void?main(String[]?args)?{
new?Test().getHm(2);//輸入次數
}
public?void?getHm(int?x){
for(int?j=0;j<x;j++){
List<Integer>?hm?=?new?LinkedList<Integer>();
hm.add(0,?0);
for(int?i?=?1;?i<=33;i++){
hm.add(i,?i);
}
Random?ran?=?new?Random();
int?count?=?hm.size();?
int?index;
System.out.print("第"+(j+1)+"組號碼:");
do{
index?=?ran.nextInt(count);if(index?!=?0){
System.out.print(hm.get(index)+"?");
hm.remove(index);
count--;
}
}while(count?!=?28);
do{
index?=ran.nextInt(17);
if(index?!=?0){
System.out.println(index);
}
}while(index?==?0);
}
}
}
是有多麽的想中獎啊