2020 NA Regionals Practice Contest 8


2021-01-24 09:00 AKST

2020 NA Regionals Practice Contest 8


2021-01-24 14:00 AKST
The end is near!
Contest is over.
Not yet started.
Contest is starting in -148 days 23:19:09

Time elapsed


Time remaining


Problem F
Fence Bowling

Illustration of the case $k=2$

Olav is spending an evening on his own, practicing in the bowling hall. Annoyingly, the side-rails in his lane are stuck in the active position, so if the ball goes out of bounds, then it simply bounces back in. This seems unfair to Olav, so he decide that any throw that does not bounce exactly $k$ times in the fences before it hits the pins will be disqualified.

For this purpose, Olav has studied in detail how the ball bounces. His finding is that a ball hitting the fence with angle $\alpha $ relative to the normal, will bounce back with degree

\[ \arctan (2 \tan (\alpha )) \]

relative to the normal. See the example in the picture to the right.

With which angle $\beta $ relative to the normal against the rails should Olav throw the ball to hit a strike after first bouncing $k$ times? Note that to hit a strike, Olav must hit exactly the middle of the bowling lane when the ball reaches the end of the lane. He always begins the throw from the middle of the lane as well.


The first and only line of input contains three positive integers $k$, $w$ and $\ell $. Here, $k$ ($1 \leq k \leq 10$) is the number of bounces required, $w$ ($1 \leq w \leq 100$) is the width of the bowling lane, and $\ell $ ($1 \leq \ell \leq 100$) is the length of the bowling lane.


A single real number, the angle $\beta $ in degrees. Any answer within an absolute or relative error of $10^{-6}$ will be accepted as a correct answer.

Sample Input 1 Sample Output 1
2 8 27