|
|
back to boardhelp me!!!!!! Posted by ooo 14 Dec 2008 16:08 #include <iostream.h> int main() {int N,M,C=1,a[50000],b[50000],c[50000],d[50000],j=0,k,s=0,i; cin>>N>>M; for(i=1; i<=N; i++) a[i]=i; for(i=1; i<=M; i++) b[i]=i; for(i=1; i<=(N-M); i++) c[i]=i; for(i=M+1; i<=N; i++) b[i]=1; for(i=N-M+1; i<=N; i++) c[i]=1; for(i=1; i<=N; i++) C*=a[i]/(b[i]*c[i]); for(i=2; i<=C/2; i++) if(C%i==0) d[j++]=i; for(i=0; i<=j; i++) for(k=2; k<=d[i]/2; k++) if(d[i]%k==0) continue; else s++; cout<<s; return 0; } |
|
|