백준 알고리즘
[백준(BOJ) - Python] 1085번 <직사각형에서 탈출>
멜론이즈
2022. 2. 19. 19:33
📄문제
🔍나의 코드
x, y, w, h = map(int,input().split())
x1 = w-x
y1 = h-y
print(min(x, x1, y, y1))
💡다른 코드들을 참조해 수정한 코드
x, y, w, h = map(int,input().split())
print(min(x, w-x, y, h-y))