POJ 2249时间:2023-03-08 16:52:47 #include<stdio.h> longlong sum; int main() { int k,n,m; while(~scanf("%d%d",&n,&m)&&(n!=0||m!=0)) { sum =1; m = m<(n-m)?m:n-m; for(k =1;k <= m;k++) sum =(sum*(n-m+k))/k; printf("%lld\n",sum); } return0;}