1085번 - 직사각형에서 탈출
x,y,w,h = map(int,input().split()) if h > 1000 or x < 0 or y < 0 or w < 0: print('wrong input') else: x_length = w-x y_length = h-y if x_length < y_length: print(x_length) else: print(y_length)
반례 : 1 1 3 3
올바른 답 : 1
위 코드의 출력 : 2
댓글을 작성하려면 로그인해야 합니다.
jus981014 3년 전