[AppleScript] 纯文本查看 复制代码 public static int Cm_n(int m, int n) {
int sum = 1;
for (int i = m; i > (m - n); i--) {
sum *= i;
}
for (int j = n; j > 0; j--) {
sum /= j;
}
return sum*16;
}
public static int forCm_n(){
int sum = 0;
for (int r1 = 1; r1 <= 33; r1++)
{
for (int r2 = r1+1; r2 <= 33; r2++)
{
for (int r3 = r2+1; r3 <= 33; r3++)
{
for (int r4 = r3+1; r4 <= 33; r4++)
{
for (int r5 = r4+1; r5 <= 33; r5++)
{
for (int r6 = r5+1; r6 <= 33; r6++)
{
for (int bl = 1; bl <= 16; bl++)
{
sum++;
}
}
}
}
}
}
}
return sum;
} |