Friday 21 July 2017

SPOJ : FENCE1 Solution



#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
#include<iostream>
#define LL long long
using namespace std;

int main()
{
   int a;
//Don't use 22/7 or 22.0/7.0 because its value is different    double pi=3.14159265359;
   while(
scanf("%d",&a) && a!=0)
   {
      printf("%.2lf\n",(double)(a*a)/pi/2);

  }

   return 0;
}


No comments:

Post a Comment

SPOJ : MARBLES Solution

Question  MARBLES - Marbles Explaination.... Fill n spaces , with k colors. First select k spaces with k-different color.  Now we are l...