본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬]21339번 Contest Struggles

by 현장 2021. 4. 21.

-코드

n, k = map(int, input().split())
d, s = map(int, input().split())
r = ((n * d) - (k * s)) / (n - k)
if 0 > r or r > 100:
    print("impossible")
else:
    print(round(r, 6))