import java.util.*;
public class CaiMi {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("请输入选号上限:");
int max = Integer.parseInt(br.readLine());
Random r = new Random();
System.out.println("\n请输入选号个数:");
int n = Integer.parseInt(br.readLine());
for(int i = 1; i <= n; i++)
System.out.print(r.nextInt(max) + 1 + ", ");
}
}
没有评论:
发表评论