#28225: CPP


11030067@mail.hpsh.tp.edu.tw (和平110級鄧雨珊)

學校 : 臺北市立和平高級中學
編號 : 163096
來源 : [61.64.210.174]
最後登入時間 :
2022-10-23 16:54:59
a623. 3. Combination -- HP CodeWars2007 | From: [203.72.60.240] | 發表日期 : 2021-11-19 13:52

#include <iostream>
using namespace std;

int f(int n){
int ans=1;
for (int i=1; i<=n; i++){
ans*=i;
}
return ans;
}
int main(){
int n, m;
while (cin >> n >> m){
cout << f(n)/(f(m)*f(n-m)) <<endl;
}
}
 
ZeroJudge Forum