1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#include <iostream> #include <string.h> #include <stdio.h> #include <math.h> #define lld long long using namespace std; int main() { int t; double PI; double l,r,A,C,w; cin>>t; PI= acos(- 1); while(t--) { cin>>l; r=l/5; w= (6*l)/10; A = w*l; C= PI*r*r; A -=C; printf("%.2lf %.2lf\n",C,A); } return 0; } |