The input contains a single floating-point number *x* with exactly 6 decimal places (0 &lt; *x* &lt; 5).
import math

ans = float(input())
ff = 999999999.9

for h in range(1, 11):
    for b in range(1, 11):
        sum_val = h * b / math.sqrt(4 * h**2 + b**2)
        d = abs(ans - sum_val)
        if d < ff:
            ff = d
            B = b
            H = h

print(B, H)# 1698242115.8687446