Distributing the balls

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

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. --Deb

Every A and B can be distinguishable.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

6 3
10 3
20 20
19 14
14 9
20 20
9 9
19 4
18 18
17 13
19 19
16 16
3 1
4 2
13 3
14 4
17 13
17 12
18 9
13 13
18 2

Sample output:

540
55980
2432902008176640000
21234672840116736000
1863435974400
2432902008176640000
362880
270232006800
6402373705728000
30575780537702400
121645100408832000
20922789888000
1
14
1569750
249401880
30575780537702400
29708792431718400
38528927611574400
6227020800
262142

Sample input:_

19 10
11 7
17 9
19 19
19 2
20 10
13 3
19 16
20 16
1 0
16 16
18 14
20 19
14 11
16 16
11 11
16 11
14 4
17 4
20 14

Sample output:

1732015476199008000
322494480
3457819037312640
121645100408832000
524286
21473732319740064000
1569750
11029155770400768000
467644314338353152000
0
20922789888000
733062897120153600
23112569077678080000
2637143308800
20922789888000
39916800
1155068769254400
249401880
16664094960
549443323130397696000

Sample input:_

18 17
20 19
15 13
18 9
20 20
17 14
9 2
14 13
18 11

Sample output:

54420176498688000
23112569077678080000
28332944640000
38528927611574400
2432902008176640000
21785854970880000
510
566658892800
334942064711654400

Ranking

Perl _

RankUserSizeTimeDateStatistics
1tybalt89940.99482011/04/03 07:48:520B / ?B / ?B
2tails1362.53512011/03/31 23:38:560B / 54B / 76B
3teebee(tybalt89)920.68582011/06/24 16:50:320B / 36B / 52B

Python _

RankUserSizeTimeDateStatistics
1hallvabo1090.08262011/04/04 08:28:230B / 61B / 42B
2llhuii(mitchs (Rivu Das))991.37342014/08/13 22:58:470B / 60B / 33B
3mitchs (Rivu Das)1001.08352014/08/13 01:30:010B / 61B / 34B
4tester1090.10282014/06/14 14:07:550B / ?B / ?B
5Rivu Das1400.98662014/08/13 00:27:580B / ?B / ?B
6lupus1600.13812013/06/24 13:47:514B / 75B / 54B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima1110.29082011/03/31 09:02:050B / 56B / 41B
2youz1110.18442011/03/31 12:39:170B / 55B / 41B

Arc _

RankUserSizeTimeDateStatistics
1youz1066.13802011/03/31 12:38:540B / 50B / 42B

J _

RankUserSizeTimeDateStatistics
1pooq540.17272011/03/29 14:02:130B / 16B / 36B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai2050.13152011/03/29 15:47:260B / 131B / 47B

Haskell _

RankUserSizeTimeDateStatistics
1sjoerd_visscher1370.13612011/04/03 08:16:356B / ?B / ?B

Maxima _

RankUserSizeTimeDateStatistics
1pooq650.48752011/03/29 16:18:080B / 37B / 27B

GolfScript _

RankUserSizeTimeDateStatistics
1narb350.92062011/04/04 17:52:130B / 6B / 29B
2pjt33370.64512011/04/02 04:03:390B / 4B / 33B
3_420.60832011/03/30 21:34:141B / ?B / ?B
4Peter Taylor (checking by Deb)420.63782011/03/30 21:34:561B / ?B / ?B
5eBusiness450.40782011/04/03 02:44:000B / ?B / ?B
6tester350.45532014/06/14 14:11:590B / ?B / ?B

Language Ranking_

RankLangUserSizeScore
1GolfScriptnarb3510000
2Jpooq546481
3Maximapooq655384
4Perlteebee(tybalt89)923804
5Pythonllhuii(mitchs (Rivu Das))993535
6Arcyouz1063301
7Common LISPkozima1113153
8Haskellsjoerd_visscher1372554
9OCamlm.ukai2051707

return to the top page