|
|
back to board10 lines,got AC :D Posted by hoan 8 Oct 2010 13:01 #include <cstdio> void main (){ int res= 0, a1, a2; double p, q; scanf ("%lf%lf", &p, &q); do{ res ++,a1= (int)(p* (double)res)/100, a2= (int)(q* (double)res-(1e-7))/100; }while (a1== a2); printf ("%d\n", res); } Re: 10 lines,got AC :D Posted by Drino 25 Oct 2010 14:23 Edited by author 25.10.2010 14:29 Edited by author 25.10.2010 14:29 |
|
|