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 |
/**********12502**********/ #include <iostream> #include <string.h> #include <stdio.h> #include <math.h> #define lld long long using namespace std; int main() { int t;//a= 2/15 b=1/12 double x,y,z; double extra,avg; cin>>t; while(t--) { cin>>x>>y>>z; avg=(x+y)/3; extra = x-avg; printf("%.0lf\n",(extra*z)/avg); } return 0; } |