문제2029--Ladder

2029: Ladder

실행시간 제한: 2 Sec  메모리사용 제한: 128 MB
제출: 47  통과: 33
[제출] [채점기록] [묻고답하기]

문제 설명

You are attempting to climb up the roof to fix some leaks, and have to go buy a ladder. The ladder needs to reach to the top of the wall, which is h centimeters high, and in order to be steady enough for you to climb it, the ladder can be at an angle of at most v degrees from the ground. How long does the ladder have to be?

입력 설명

The input consists of a single line containing two integers h and v, with meanings as described above. You may assume that 1 ≤ h ≤ 10000 and that 1 ≤ v ≤ 89.

출력 설명

Write a single line containing the minimum possible length of the ladder in centimeters, rounded up to the nearest integer.

입력 예시 Copy

500 70

출력 예시 Copy

533

도움

Sample Input 2

1000 10

Sample Output 2

5759

출처/분류