Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define pi acos(-1.0)
- int main()
- {
- ll t,i;
- double a,a1,a2,b,c,d,e,f,j,l,area;
- scanf("%lld",&t);
- for(i=1;i<=t;i++)
- {
- scanf("%lf %lf %lf",&a,&b,&c);
- a1=(a*c)/b;
- a2=(a+a1)*(c+a1)/(b-a1);
- area=a2+a1;
- if(b-a1>0)printf("Case %lld: %.8lf\n",i,area);
- else
- {
- printf("Case %lld: -1\n",i);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement