// @BEGIN_OF_SOURCE_CODE
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <sstream>
#include <set>
#include <math.h>
#define N 1000000
using namespace std;
int main ()
{
double r;
double n;
while ( scanf ("%lf %lf", &r, &n) != EOF ) {
printf ("%.3lf\n", n*.5*r*r*sin(acos(-1.0)*2.0/n));
}
return 0;
}
// @END_OF_SOURCE_CODE
Published by Shahab
Completed B.Sc in CSE, @United International University, Dhaka.
Currently working as Development Engineer, Android and iOS Application.
View all posts by Shahab