16 lines
374 B
C
16 lines
374 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
#define PI 3.14159265358979323846
|
|
|
|
int main() {
|
|
int wall_height, max_angle;
|
|
|
|
scanf("%d %d", &wall_height, &max_angle);
|
|
double max_angle_radians = max_angle * PI / 180.0;
|
|
double ladder_length = wall_height / sin(max_angle_radians);
|
|
int rounded_length = (int)ceil(ladder_length);
|
|
printf("%d\n", rounded_length);
|
|
|
|
return 0;
|
|
}
|