|
|
back to boardwhere is my mistake? Posted by ooo 8 Dec 2008 21:10 #include <iostream.h> int f(int); void main() {int N,M,C,i,s=0; cin>>N>>M; C=(f(N))/(f(M)*f(N-M)); for(i=2;i<=C/2;i++) if(C%i==0) s++; cout<<s;} int f(int x) {int i,p=1; for(i=1;i<=x;i++) p*=i; return p;} |
|
|