fork(8) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. unsigned N,X,Y,Z;
  7. for(cin>>N;N--;cout<<(unsigned)(12*(Y-X/(Z-1.))+0.5)<<endl) cin>>X>>Y>>Z;
  8. return 0;
  9. }
Success #stdin #stdout 0s 3300KB
stdin
3
21 6 5
11 1 13
223 2 113
stdout
9
1
0