Collecting bees

Youโ€™d like to collect n bees into k jars. As the bees are small, you donโ€™t notice the difference between them. So, the only difference is made when there are different numbers of bees in different jars.
How many different ways are there to collect n bees into k jars?
notion image

Input

The first line of the input contains two integers n and k (1 โ‰ค n, k โ‰ค 30).

Output

The program should print the different number of ways to collect the bees.

Examples

Input
Output
3 1
1
5 2
6

Explanation

  1. The only way is to keep all the bees in one jar
  1. (0, 5) (1, 4) (2, 3) (3, 2) (4, 1) (5, 0) โ‡’ 6 different ways
ย 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue