import java.util.Arrays;
import java.util.Scanner;
public class FamilyAccount {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("how many numbers do you need to draw?");
int k = in.nextInt();
System.out.print("what is the highest number you can draw?");
int n = in.nextInt();
int[] number = new int[k];//建立一个新的数组
for (int i = 0; i < number.length; i++)
number[i] = i + 1;
int[] result = new int[n];
for (int i = 0; i < result.length; i++) {
//建立一个0~n-1之间的索引值
int r = (int) (Math.random() * n);
result[i] = number[r];
number[r] = number[n - 1];
n--;
}
Arrays.sort(result);
System.out.print("bet the following combination,It'll make you rich");
for (int r : result)
System.out.println(r);
}
}