fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a, x, b, y, p, z;
  7. float s, f;
  8. cin >> a;
  9. cin >> x;
  10. cin >> b;
  11. cin >> y;
  12. cin >> p;
  13. s = p * x;
  14. f = p * y;
  15. z = (b*100 - a*100)/s - f;
  16. cout << z;
  17.  
  18. }
Success #stdin #stdout 0s 5316KB
stdin
20
90
120
20
5
stdout
-77