No older revisions available
No older revisions available
소감 ¶
코드 ¶
~cpp #include <iostream> using namespace std; void find_combination(int n, int c); int main() { int row, col; cin >> row >> col; find_combination(row, col); return 0; } void find_combination(int n, int c) { if (n == 0 || c == 0) { cout << 1 << endl; return; } int num = 1; for (int i = n; i > c; i--) num *= i; for (i = n - c; i >= 2; i--) num /= i; cout << num << endl; }