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("%lf\n", w); return 0; } |
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxmbG9hdC5oPgojaW5jbHVkZSA8bWF0aC5oPgoKI2RlZmluZSBQSSAzLjE0MTU5MjY1NAoKaW50Cm1haW4odm9pZCkKewogIGRvdWJsZSByLCBkLCB3OwogIHNjYW5mKCIlbGYgJWxmIiwgJnIsICZkKTsKICBwcmludGYoIiVsZiAlbGZcbiIsIHIsIGQpOwogIHcgPSBzcXJ0KHIqciAtIGQqZC80KTsKICB3ID0gUEkgKiB3ICogdzsKICBwcmludGYoIiVsZlxuIiwgdyk7CiAgcmV0dXJuIDA7Cn0K
-
upload with new input
-
result: Success time: 0.01s memory: 1724 kB returned value: 0
10 10
10.000000 10.000000 235.619449
-
result: Success time: 0.01s memory: 1724 kB returned value: 0
0.000000 -0.092288 nan



