UVa : 10432


// @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

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.