fork download
  1. #include<iostream>
  2. #include<string>
  3. #include<vector>
  4. #include<map>
  5. #include<algorithm>
  6. #include<queue>
  7. #include<fstream>
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12. ifstream cin("isco.in");
  13. int t;
  14. cin >> t;
  15. while (t--)
  16. {
  17. int x, y, p, z;
  18. cin >> x >> y >> p >> z;
  19. cout << (x*y - z)*p << endl;;
  20. }
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 4460KB
stdin
Standard input is empty
stdout
Standard output is empty