Distributing the balls
Submit
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
Rank | User | Size | Time | Date | Statistics |
---|
1 | kozima | 111 | 0.2908 | 2011/03/31 09:02:05 | 0B / 56B / 41B |
2 | youz | 111 | 0.1844 | 2011/03/31 12:39:17 | 0B / 55B / 41B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | youz | 106 | 6.1380 | 2011/03/31 12:38:54 | 0B / 50B / 42B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | pooq | 54 | 0.1727 | 2011/03/29 14:02:13 | 0B / 16B / 36B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | m.ukai | 205 | 0.1315 | 2011/03/29 15:47:26 | 0B / 131B / 47B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | pooq | 65 | 0.4875 | 2011/03/29 16:18:08 | 0B / 37B / 27B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | narb | 35 | 0.9206 | 2011/04/04 17:52:13 | 0B / 6B / 29B |
2 | pjt33 | 37 | 0.6451 | 2011/04/02 04:03:39 | 0B / 4B / 33B |
3 | _ | 42 | 0.6083 | 2011/03/30 21:34:14 | 1B / ?B / ?B |
4 | Peter Taylor (checking by Deb) | 42 | 0.6378 | 2011/03/30 21:34:56 | 1B / ?B / ?B |
5 | eBusiness | 45 | 0.4078 | 2011/04/03 02:44:00 | 0B / ?B / ?B |
6 | tester | 35 | 0.4553 | 2014/06/14 14:11:59 | 0B / ?B / ?B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | GolfScript | narb | 35 | 10000 |
2 | J | pooq | 54 | 6481 |
3 | Maxima | pooq | 65 | 5384 |
4 | Perl | teebee(tybalt89) | 92 | 3804 |
5 | Python | llhuii(mitchs (Rivu Das)) | 99 | 3535 |
6 | Arc | youz | 106 | 3301 |
7 | Common LISP | kozima | 111 | 3153 |
8 | Haskell | sjoerd_visscher | 137 | 2554 |
9 | OCaml | m.ukai | 205 | 1707 |
return to the top page