10209 - Is This Integration ?
#include <stdio.h> #include <math.h> /* */ //多次错误都是因为我将PI定义为3.1415926 #define PI acos(-1.0) int main() { double r; while(scanf("%lf",&r)!=EOF) { double x,y,z; z=r*r*(1-PI/6.0 - sqrt(3.0)/4); y=r*r*(1-PI/4.0 )-2*z; x=r*r *(PI/2.0 - 1)-2*y; printf("%.3lf %.3lf %.3lf ",x, 4.0*y, 4.0*z); } }