수학과 관련된 문제이기도 하기 때문에 공식을 조금 찾아보기도 해야하긴 하다.

그래도 제대로 수학적인 공식만 사용한다면 쉬운 문제이다.

1
2
3
4
diagnol, height, width = map(int, input().split())
 
res = diagnol / (height**2 + width**2)**0.5
print(int(height*res), int(width*res))
cs

+ Recent posts