Skip to content

Instantly share code, notes, and snippets.

@jinnatul
Created January 14, 2019 16:02
Show Gist options
  • Save jinnatul/f2bd27911e9a9d92b7b4a03c1017a31b to your computer and use it in GitHub Desktop.
Save jinnatul/f2bd27911e9a9d92b7b4a03c1017a31b to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
/// Typedef
typedef long long ll;
#define sc1(a) scanf("%lld",&a)
#define sc2(a,b) scanf("%lld %lld",&a,&b)
#define pf1(a) printf("%lld\n",a)
#define pf2(a,b) printf("%lld %lld\n",a,b)
#define mx 10000007
#define mod 100000007
#define PI acos(-1.0)
int dr[] = {-2,-2,-1,-1,1,1,2,2};
int dc[] = {-1,1,-2,2,-2,2,-1,1};
int main()
{
ll num, m, tc = 1;
double n, r;
cin >> n >> r;
double angel = sin(PI/n);
double R = (angel * r) / (1.0 - angel);
printf("%.7lf\n", R);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment