https://www.acmicpc.net/problem/1085
굳이 삼항연산자를 쓴 난 바보다..
import sys input = sys.stdin.readline x, y, w, h = map(int, input().split()) a = h-y if h-y < y else y b = w-x if w-x < x else x result = a if a<b else b print(result) #print( min([x, y, w-x, h-y]) )