EPS/2024/03/25-03-24/d.py

21 lines
293 B
Python
Raw Normal View History

2024-04-15 13:45:30 +02:00
from math import ceil
def main():
x, y = [int(i) for i in input().split()]
if x==y:
return x
c = ceil(x / (2*y))
if x < y:
return -1
if c > (x+y)/(2*x):
print(c, (x+y)/(2*x))
c = ceil((x+y)/(2*x))
return (x+y)/(2*c)
print(main())