fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5. int a, b, c, d, e;
  6. cin >> a >> b >> c >> d >> e;
  7. a = (a - b) + (c * e) -((d / 2) * e);
  8. cout << a;
  9. return 0;
  10. }
Success #stdin #stdout 0s 5312KB
stdin
12000
10000
100
200
5























stdout
2000