বৃত্তবন্দী ( Fitting Circles )

CPU: 1s
Memory: 1024MB


R ব্যাসার্ধের একটি বৃত্ত C বিবেচনা করি। সমান ব্যাসার্ধের n টি ছোট বৃত্ত C এর মধ্যে এমনভাবে স্থাপন করতে হবে যেন n টি ছোট বৃত্তের প্রত্যেকটি C কে অন্তঃস্থভাবে স্পর্শ করে এবং অপর দুইটি ছোট বৃত্তকে বহিঃস্থভাবে স্পর্শ করে। R এবং একটি ধনাত্মক পূর্ণসংখ্যা n (n>2) দেওয়া থাকবে, তোমাকে ছোট বৃত্তগুলোর ব্যাসার্ধ r বের করতে হবে। ভালভাবে বুঝার জন্য নীচের চিত্রটি দেখ।

Consider a circle C of radius R. n smaller circles of same radius are to be placed inside C in such a way that each of the n smaller circles internally touches C and externally touches two other smaller circles. Given R and a positive integer n (n > 2), you have to find the radius r of the smaller circles. See the above figure for better understanding.


ইনপুটের বর্ণনা

ইনপুটের প্রথম লাইনে টেস্টকেসের সংখ্যা T দেওয়া থাকবে। পরবর্তী T (1 <= T <= 20) টি লাইনের প্রত্যেকটিতে স্পেস দিয়ে আলাদা করা দুইটি পূর্ণসংখ্যা R (1 <= R <= 1000) এবং n (3 <= n <= 100) দেওয়া থাকবে, যা যথাক্রমে বড় বৃত্তের ব্যাসার্ধ এবং ছোট বৃত্তের সংখ্যা নির্দেশ করে।


Input

The first line of the input gives the number of test cases, T (1 <= T <= 20). Each of following T lines will consist of two space separated integers R (1 <= R <= 1000) and n (3 <= n <= 100), representing the radius of the large circle and the number of circles to be inscribed in.


অাউটপুটের বর্ণনা

প্রতিটি টেস্টকেসের জন্য একটি লাইনে ছোট বৃত্তগুলির ব্যাসার্ধ r প্রিন্ট করতে হবে। r যেকোন বাস্তব সংখ্যা হতে পারে। r দশমিকের পর ঠিক দুই ঘর পর্যন্ত প্রিন্ট করতে হবে। ভালমত বুঝার জন্য স্যাম্পল ইনপুট/আউটপুট দেখ।


Output

For each test case print a single line containing the radius of the small circles. Print exactly two places after the decimal point. For clarification see the sample.


Sample

InputOutput
3 10 3 10 6 10 104.64 3.33 2.36