1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include <stdio.h> #include <float.h> #include <math.h> #define PI 3.141592654 int main(void) { double r, d, w; scanf("%lf %lf", &r, &d); printf("%lf %lf\n", r, d); w = sqrt(r*r - d*d/4); w = PI * w * w; printf("%.2lf\n", w); return 0; } |
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxmbG9hdC5oPgojaW5jbHVkZSA8bWF0aC5oPgoKI2RlZmluZSBQSSAzLjE0MTU5MjY1NAoKaW50Cm1haW4odm9pZCkKewogIGRvdWJsZSByLCBkLCB3OwogIHNjYW5mKCIlbGYgJWxmIiwgJnIsICZkKTsKICBwcmludGYoIiVsZiAlbGZcbiIsIHIsIGQpOwogIHcgPSBzcXJ0KHIqciAtIGQqZC80KTsKICB3ID0gUEkgKiB3ICogdzsKICBwcmludGYoIiUuMmxmXG4iLCB3KTsKICByZXR1cm4gMDsKfQo=
-
upload with new input
-
result: Success time: 0.01s memory: 1724 kB returned value: 0
1000 1500
1000.000000 1500.000000 1374446.79
-
result: Success time: 0.02s memory: 1724 kB returned value: 0
0.000000 -0.488471 nan



