문제
코드
x,y,w,h=map(int,input().split())
list=[]
list.append(x)
list.append(y)
list.append(h-y)
list.append(w-x)
cnt=0
b=0
for i in range(4):
if b<=list[i]:
b=list[i]
cnt+=list[i]
print(min(list))
풀이
리스트에 숫자를 대입하고
학교수업시간에 배운걸 좀 응용한 다음
(그 가장 작은 수 뽑기?)그 중에서 제일 작은 값을 뽑는 것으로 풀어 보았습니다.