lightoj 1022

直接算即可,特别要注意精度
#include<cstdio>
#include<cmath>
int main(){
    int t, CASE(0);
    double r;
    scanf("%d", &t);
    while(t--){
        scanf("%lf", &r);
        printf("Case %d: %.2lf
", ++CASE, 1e-9 + 4*r*r-M_PI*r*r);
    }
    return 0;
}

原文地址:https://www.cnblogs.com/anhuizhiye/p/3933117.html