C

#include <stdio.h>longn,k;intgcd(inta,intb){returnb?gcd(b,a%b):a;}intread_case(){scanf("%ld %ld",&n,&k);if(n==0&&k==0)return0;return1;}voidsolve_case(){inta[20];longi,j,d,g,res,f;f=k;if(k>n/2)k=n-k;for(i=0;i<k;i++)a[i]=n-i;for(j=2;j<=k;j++)for(i=0,d=j;d>1;i++){g=gcd(a[i],d);a[i]/=g;d/=g;}for(i=0,res=1;i<k;res*=a[i++]);printf("%ld things taken %ld at a time is %ld exactly.\n",n,f,res);}intmain(){while(read_case())solve_case();return0;}