Hares and Polygons. EASY
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
N rabbits are positioned at the vertices of a regular N-gon with side length a. They all start moving simultaneously at a constant speed v. The first rabbit always moves towards the second rabbit, the second towards the third, the third towards the fourth, and so on, with the N-th rabbit moving towards the first. After a certain time t, all N rabbits will converge at a single point. Your task is to help them determine how long they need to run to meet.
Input
Each test case provides 3 numbers: an integer N (1 ≤ N ≤ 10^3), a real number a (0 < a ≤ 10^6), and a real number v (0 ≤ v ≤ 10^6).
Output
Output the minimum time required for the rabbits to meet, formatted to 6 decimal places. If the rabbits will never meet, output -1.
Examples
Input #1
Answer #1
Submissions 186
Acceptance rate 13%