|
|
back to boardwhere I'm wrong . Posted by ttt 13 May 2008 16:42 #include<stdio.h> #include<math.h> int yue(int n) { int p=1,i; for(i=2;i<=(int)sqrt(n);i++) if(n%i==0) p++; return p; } int main () { int m,n,k,i,test; while(scanf("%d %d %d",&m,&n,&k)!=EOF) { test=0; for(i=1;i<=1000;i++) if(n==yue(i)) { if(m==yue(i-k)) { printf("%d\n",i); test=1; break; } } if(test==0) printf("0\n");
} return 0; } |
|
|