ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1011. Conductors

AND......
Posted by Algorist 1 Sep 2001 18:19
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?