// yukicoder: No.338 アンケート機能 // 2019.4.15 bal4u #include int tbl[101][101]; int round(int a, int s) { int ans = a / s; if ((10 * a / s) % 10 >= 5) ans++; return ans; } int main() { int a, b, A, B; for (a = 0; a <= 100; a++) for (b = 0; b <= 100; b++) if (a + b > 0) { A = round(100 * a, a + b), B = round(100 * b, a + b); if (tbl[A][B] == 0 || tbl[A][B] > a + b) tbl[A][B] = a + b; } scanf("%d%d", &A, &B); printf("%d\n", tbl[A][B]); return 0; }