fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int a, b, c, d, e, nr;
  7. cin >> a >> b >> c >> d >> e;
  8. nr = a - b + (e * c) - ((e / 2)*d);
  9. cout <<nr;
  10. return 0;
  11. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
499256368