|
|
back to boardwhy why why wrong answer??? # include <math.h> # include <stdio.h> # include <algorithm> using namespace std; int a,b,c,x,y; int main() { scanf("%d %d %d",&a,&b,&c);
for(int i=1;i<10001;i++) { x=0; y=0;
for(int j=1;j<=(int)sqrt((double)i)+1;j++) if(i%j==0) x++;
if(i-c>0) { for(int j=1;j<=(int)sqrt((double)(i-c))+1;j++) if(i%j==0) y++; }
if(b==x && a==y) {printf("%d",i);getchar();getchar();return 0;} }
printf("0");system("Pause"); } |
|
|