|
|
back to boardAND...... I wrote the solution in C++ and in PASCAL. WA both of the time. See in C : #include <stdio.h> #include <math.h> float a,b; long int c; short int found; int main () { scanf("%f %f",&a,&b); c=0; found=0; while (found!=1) { if (floor(a*c/100)!=floor(b*c/100)) found=1; else c++; } printf("%d\n",c); return 0; } I've used PASCAL as well. Where do I make a mistake? |
|
|