1451: PIPI的数学题VIII

注意:arccos函数名为acos
double的输入为%lf

#include <bits/stdc++.h>
using namespace std;
const double pi=acos(-1);
int main() {
	double r;
	int k;
	while(scanf("%lf %d",&r,&k)!=EOF){
		
		double s = k*r*r*sin(2*pi/k)/2;
		printf("%.3f\n",s);
	}
}
posted @ 2026-02-10 16:45  peter_shen  阅读(5)  评论(0)    收藏  举报