|
||||||||||
DrunkTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 501 Accepted Submission(s): 222 Special Judge Problem Description Jenny is seriously drunk. He feels as if he is in an N-dimension Euclidean space, wandering aimlessly. In each step, he walks toward some direction and the “length” of each step will not exceed R. Technically speaking, Jenny is initially located at the origin of the N-dimension Euclidean space. Each step can be represented by a random N-dimension vector(x1, x2, ... , xn) chosen uniformly from possible positions satisfying xi >= 0 and x12 + x22 + ... <= R2. Assume the expectation of his coordinate after his first step is (y1, y2, ... , yn). He wants to know the minimum yi . Input There are several (about 100,000) test cases, please process till EOF. Each test case, only one line contains two integers N and R, representing the dimension of the space and the length limit of each step.(1 <= n <= 2 * 105, R <= 105). Output For each test case, print a real number representing the answer to the question above. Your answer is considered correct if the difference between your answer and the correct one is less than 10-6. Sample Input
Sample Output
Source | ||||||||||
|