#include <stdio.h>
//まず
int factorial(int n) {
int result = 1;
for(int i = 1; i <= n; i++) {
result *= i;
}
return result;
}
//次に
int comb(int m, int k) {
return factorial(m) / (factorial(k) * factorial(m - k));
}
int main(void) {
int m, k;
if(m < k) {
} else if(m > 12) {
} else {
int combination = comb(m, k);
printf("%d個の中から%d個を取り出す組合せ数は、%d通りです。\n", m
, k
, combination
); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v44G+44GaCmludCBmYWN0b3JpYWwoaW50IG4pIHsKICAgIGludCByZXN1bHQgPSAxOwogICAgZm9yKGludCBpID0gMTsgaSA8PSBuOyBpKyspIHsKICAgICAgICByZXN1bHQgKj0gaTsKICAgIH0KICAgIHJldHVybiByZXN1bHQ7Cn0KCi8v5qyh44GrCmludCBjb21iKGludCBtLCBpbnQgaykgewogICAgcmV0dXJuIGZhY3RvcmlhbChtKSAvIChmYWN0b3JpYWwoaykgKiBmYWN0b3JpYWwobSAtIGspKTsKfQppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgbSwgazsKICAgIHNjYW5mKCIlZCIsICZtKTsKICAgIHNjYW5mKCIlZCIsICZrKTsKCiAgICBpZihtIDwgaykgewogICAgICAgIHByaW50Zigi44Ko44Op44O8XG4iKTsKICAgIH0gZWxzZSBpZihtID4gMTIpIHsKICAgICAgICBwcmludGYoIuOCqOODqeODvFxuIik7CiAgICB9IGVsc2UgewogICAgICAgIGludCBjb21iaW5hdGlvbiA9IGNvbWIobSwgayk7CiAgICAgICAgcHJpbnRmKCIlZOWAi+OBruS4reOBi+OCiSVk5YCL44KS5Y+W44KK5Ye644GZ57WE5ZCI44Gb5pWw44Gv44CBJWTpgJrjgorjgafjgZnjgIJcbiIsIG0sIGssIGNvbWJpbmF0aW9uKTsKICAgIH0KCiAgICByZXR1cm4gMDsKfQo=