#include<iostream> #include<cstdio> #include<cmath> using namespace std; #define PI 3.1415927 int main(){ int t,n; double R,tmp; scanf("%d",&t); for(int i=1;i<=t;i++){ scanf("%lf%d",&R,&n); printf("Scenario #%d:\n",i); tmp = cos((n-2)*1.0*PI/2/n); printf("%.3lf\n\n",tmp*R/(1+tmp)); } return 0; }