Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- double x,y,z,k,result;
- int t;
- scanf("%d",&t);
- while(t-- && scanf("%lf%lf%lf",&x,&y,&z)==3)
- {
- k=(x+y)/3;
- result=(z/k)*(x-k);
- if(result<=0)
- {
- result=0;
- }
- printf("%.0lf\n",result);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement