Skip to main content
edited tags
Link
jimmy23013
  • 37k
  • 6
  • 77
  • 148
edited body
Source Link
Quixotic
  • 2.4k
  • 15
  • 27

Challenge

In this task you have compute the number of ways we can distribute A balls into B cells with with every cell having at-least one ball.

The inputs A and B are given in a single line separated by a blank,the inputs are terminated by EOF.

You may like to check your solutions here.

Input

0 0
1 0
12 4
6 3
18 17
20 19
15 13
18 9
20 20
17 14
9 2
14 13
18 11

Output

01
0
14676024
540
54420176498688000
23112569077678080000
28332944640000
38528927611574400
2432902008176640000
21785854970880000
510
566658892800
334942064711654400

Constraints

  • Every A and B can be distinguishable.
  • 0 <= A,B <= 20
  • You can use any language of your choice
  • Shortest solution wins!

Challenge

In this task you have compute the number of ways we can distribute A balls into B cells with with every cell having at-least one ball.

The inputs A and B are given in a single line separated by a blank,the inputs are terminated by EOF.

You may like to check your solutions here.

Input

0 0
1 0
12 4
6 3
18 17
20 19
15 13
18 9
20 20
17 14
9 2
14 13
18 11

Output

0
0
14676024
540
54420176498688000
23112569077678080000
28332944640000
38528927611574400
2432902008176640000
21785854970880000
510
566658892800
334942064711654400

Constraints

  • Every A and B can be distinguishable.
  • 0 <= A,B <= 20
  • You can use any language of your choice
  • Shortest solution wins!

Challenge

In this task you have compute the number of ways we can distribute A balls into B cells with with every cell having at-least one ball.

The inputs A and B are given in a single line separated by a blank,the inputs are terminated by EOF.

You may like to check your solutions here.

Input

0 0
1 0
12 4
6 3
18 17
20 19
15 13
18 9
20 20
17 14
9 2
14 13
18 11

Output

1
0
14676024
540
54420176498688000
23112569077678080000
28332944640000
38528927611574400
2432902008176640000
21785854970880000
510
566658892800
334942064711654400

Constraints

  • Every A and B can be distinguishable.
  • 0 <= A,B <= 20
  • You can use any language of your choice
  • Shortest solution wins!
added 52 characters in body; deleted 16 characters in body
Source Link
Quixotic
  • 2.4k
  • 15
  • 27

Challenge

In this task you have compute the number of ways we can distribute A balls into B cells with with every cell having at-least one ball.

The inputs A and B are given in a single line separated by a blank,the inputs are terminated by EOF.

You may like to check your solutions here.

Input

0 0
1 0
12 4
6 3
18 17
20 19
15 13
18 9
20 20
17 14
9 2
14 13
18 11

Output

0
0
14676024
540
54420176498688000
23112569077678080000
28332944640000
38528927611574400
2432902008176640000
21785854970880000
510
566658892800
334942064711654400

Constraints

  • Every A and B can be distinguishable.
  • 0 <= A,B <= 20
  • You can use any language of your choice
  • Shortest solution wins!

Challenge

In this task you have compute the number of ways we can distribute A balls into B cells with with every cell having at-least one ball.

The inputs A and B are given in a single line separated by a blank,the inputs are terminated by EOF.

You may like to check your solutions here.

Input

12 4
6 3
18 17
20 19
15 13
18 9
20 20
17 14
9 2
14 13
18 11

Output

14676024
540
54420176498688000
23112569077678080000
28332944640000
38528927611574400
2432902008176640000
21785854970880000
510
566658892800
334942064711654400

Constraints

  • Every A and B can be distinguishable.
  • 0 <= A,B <= 20
  • You can use any language of your choice
  • Shortest solution wins!

Challenge

In this task you have compute the number of ways we can distribute A balls into B cells with with every cell having at-least one ball.

The inputs A and B are given in a single line separated by a blank,the inputs are terminated by EOF.

You may like to check your solutions here.

Input

0 0
1 0
12 4
6 3
18 17
20 19
15 13
18 9
20 20
17 14
9 2
14 13
18 11

Output

0
0
14676024
540
54420176498688000
23112569077678080000
28332944640000
38528927611574400
2432902008176640000
21785854970880000
510
566658892800
334942064711654400

Constraints

  • Every A and B can be distinguishable.
  • 0 <= A,B <= 20
  • You can use any language of your choice
  • Shortest solution wins!
added 14 characters in body
Source Link
Quixotic
  • 2.4k
  • 15
  • 27
Loading
Tweeted twitter.com/#!/StackCodeGolf/status/52745302771372032
added 287 characters in body
Source Link
Quixotic
  • 2.4k
  • 15
  • 27
Loading
edited tags
Link
Nemo157
  • 2.1k
  • 11
  • 17
Loading
deleted 18 characters in body
Source Link
Quixotic
  • 2.4k
  • 15
  • 27
Loading
deleted 23 characters in body; added 8 characters in body
Source Link
Quixotic
  • 2.4k
  • 15
  • 27
Loading
edited title
Link
Quixotic
  • 2.4k
  • 15
  • 27
Loading
Source Link
Quixotic
  • 2.4k
  • 15
  • 27
Loading