//408K 0MS G++
#include <cstdio>
#include <cstring>
using namespace std;
int oX;
int oY;
int dX;
int dY;
inline double MIN(double a, double b) {
return a < b ? a: b;
}
inline double MAX(double a, double b) {
return a > b ? a: b;
}
void solve(int ox, int oy, int dx, int dy) {
double case1x = (dx >= ox) ? 1.0 : (double)dx/ox;
double case1y = (dy >= oy) ? 1.0 : (double)dy/oy;
double case1 = MIN(case1x, case1y);
double case2x = (dy >= ox) ? 1.0 : (double)dy/ox;
double case2y = (dx >= oy) ? 1.0 : (double)dx/oy;
double case2 = MIN(case2x, case2y);
printf("%d%%\n", (int)(MAX(case1, case2)*100));
}
int main() {
while(scanf("%d %d %d %d", &oX, &oY, &dX, &dY) != EOF) {
if (!oX && !oY && !dX && !dY) {
return 0;
}
solve(oX, oY, dX, dY);
}
}
水水更健康,就两种放法,找最大的就可以,这道题不能四舍五入。