Combinations and permutations: Difference between revisions
Content added Content deleted
ReeceGoding (talk | contribs) m (→{{header|R}}: Syntax highlighting.) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: added output) |
||
Line 1,832: | Line 1,832: | ||
} |
} |
||
</lang> |
</lang> |
||
{{out}} |
|||
<pre style="height:50ex">A sample of Permutations from 1 to 12 |
|||
1 P 0 = 1 |
|||
2 P 0 = 1 |
|||
3 P 1 = 3 |
|||
4 P 1 = 4 |
|||
5 P 1 = 5 |
|||
6 P 2 = 30 |
|||
7 P 2 = 42 |
|||
8 P 2 = 56 |
|||
9 P 3 = 504 |
|||
10 P 3 = 720 |
|||
11 P 3 = 990 |
|||
12 P 4 = 11880 |
|||
A sample of Combinations from 10 to 60 |
|||
Since the output is almost the same as Raku's, and this is only a Draft RosettaCode task, I'm not going to bother including the output of the program. |
|||
10 C 3 = 120 |
|||
20 C 6 = 38760 |
|||
30 C 10 = 30045015 |
|||
40 C 13 = 12033222880 |
|||
50 C 16 = 4923689695575 |
|||
60 C 20 = 4.1918445058055e+15 |
|||
A sample of Permutations from 5 to 15000 |
|||
5 P 1 = 5.00000000e+0 |
|||
50 P 16 = 1.03017325e+26 |
|||
500 P 166 = 3.53487492e+434 |
|||
1000 P 333 = 5.96932629e+971 |
|||
5000 P 1666 = 6.85674576e+6025 |
|||
15000 P 5000 = 9.64985399e+20469 |
|||
A sample of Combinations from 100 to 1000 |
|||
100 C 33 = 2.94692427022544e+26 |
|||
200 C 66 = 7.26975254516929e+53 |
|||
300 C 100 = 4.15825146325788e+81 |
|||
400 C 133 = 1.25794868418216e+109 |
|||
500 C 166 = 3.92602838619369e+136 |
|||
600 C 200 = 2.50601778322159e+164 |
|||
700 C 233 = 8.10320356333741e+191 |
|||
800 C 266 = 2.64562336268385e+219 |
|||
900 C 300 = 1.74335637329697e+247 |
|||
1000 C 333 = 5.77613455314442e+274</pre> |
|||
=={{header|Phix}}== |
=={{header|Phix}}== |