fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void){
  5. int n;
  6. double x;
  7. scanf("%lf %d",&x,&n);
  8. printf("%f\n",x*x*n/4/tan(M_PI/n));
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 2252KB
stdin
1 4
stdout
1.000000