Algorithms

백준 3034. 앵그리 창영

Brian Go 2022. 6. 9. 02:25

굉장히 쉬웠던 문제 !

박스 바닥의 대각선 길이보다 성냥이 길면 안되므로 피타고라스를 써서 비교해주자.

from math import sqrt

n, w, h = map(int, input().split())
l = sqrt(w**2 + h**2)
for _ in range(n):
	test = int(input())
	if test <= l :
		print("DA")
	else:
		print("NE")