eolymp
bolt
Try our new interface for solving problems
Problems

Sphere

Sphere

Want to place on the surface of a sphere of \textbf{N} points so that the minimum of the pairwise distances between these points was the maximum possible. \InputFile In a single line of input contains integers \textbf{R} (\textbf{1} ≤ \textbf{R} ≤ \textbf{1000}) and \textbf{N} (\textbf{2} ≤ \textbf{N} ≤ \textbf{4}) --- the sphere radius and the number of points, respectively. \OutputFile The output file output single real number - the maximum possible value of the minimum of pairwise distances between these points. This conclusion follows the first \textbf{10000} characters response (including a separator whole and fractional parts), without rounding.
Time limit 3 seconds
Memory limit 256 MiB
Input example #1
1 2
Output example #1
2.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
...

Example description: To save space, 9,990 characters respond in the examples are replaced by ...

Author Dmitriy Zhukov
Source Winter School, Kharkov, 2011, Day 2