// yukicoder: No.419 直角三角形 // 2019.4.15 bal4u #include #include int main() { int a, b, c, _c; scanf("%d%d", &a, &b); c = a*a + b*b; if (b < a) _c = a*a - b*b; else _c = b*b - a*a; if (_c > 0 && _c < c) c = _c; printf("%.12lf\n", sqrt(c)); return 0; }