The combinations of any 4 numbers from the 6
numbers 1, 2, 3, 4, 5, and 6 are 1 2 3 4, 1 2 3 5, 1 2 3 6, 1 2 4 5, 1 2 4 6, 1
2 5 6, 1 3 4 5, 1 3 4 6, 1 3 5 6, 1 4 5 6, 2 3 4 5, 2 3 4 6, 2 3 5 6, 2 4 5 6,
3 4 5 6, There are 15 kinds in total. If you regard them as 4 digit numbers,
you will find that they are increasing in value.
Input n and r, 1≤r≤n≤20
According to the above sequence, output all
combinations of r numbers from n numbers (1~n)
3 2
1 2
1 3
2 3