#include #include using namespace std; int shishagonyu(double x) { return (int)(x < 0.0 ? x - 0.5 : x + 0.5); } int main() { double a, b, A, B,s=1000; double ans1 ,ans2; cin >> A >> B; if (A > B) swap(A, B); for (a = 0; a < 50; a++) { for (b = a; b < 200; b++) { ans1 = (100*b / (a + b)); ans2 = (100 * a / (a + b)); ans1 = shishagonyu(ans1); ans2 = shishagonyu(ans2); if (B == ans1&&A==ans2) { if (s > a + b) { s = a + b; } } } } cout << s << endl; return 0; }