lightOJ-1072 Calm Down
using namespace std;
#define sf(a) scanf("%I64d",&a)
#define sff(a,b) scanf("%I64d %I64d",&a,&b)
#define sfff(a,b,c) scanf("%I64d %I64d %I64d",&a,&b,&c)
#define sffff(a,b,c,d) scanf("%I64d %I64d %I64d %I64d",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e) scanf("%I64d %I64d %I64d %I64d %I64d",&a,&b,&c,&d,&e)
#define read freopen("input.txt","r",stdin)
#define write freopen("output.txt","w",stdout)
#define ll long long
#define MAX 1000009
#define Max 100000000009
#define pb push_back
#define all(c) c.begin(),c.end()
#define mset(a,b) memset(a,b,sizeof(a))
#define MOD 10000007
#define ff first
#define sc second
#define pi 2*acos(0.0)
int main()
{
ll test;
scanf("%lld",&test);
for(ll j=1; j<=test; j++)
{
double R,n,r;
scanf("%lf %lf",&R,&n);
double kon=pi/n;
r=R*sin(kon)/(1+sin(kon));
cout<<fixed;
cout<<setprecision(10);
cout<<"Case "<<j<<": "<<r<<endl;
}
}
মন্তব্যসমূহ
একটি মন্তব্য পোস্ট করুন