본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#119 백준 파이썬 [1085] 직사각형에서 탈출

https://www.acmicpc.net/problem/1085

 

#Solution

x, y, w, h= map(int, input().split())
result = []

result.append(w - x)
result.append(x - 0)
result.append(h - y)
result.append(y - 0)

print(min(result))