fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a,b,c,d,g,e,f;
  6. std::cin >> a >>b >> c>> d >>g;
  7. e=(d-b)/(c-a);//d//
  8. std::cout << e;
  9. f=(c-1)/e; //a1//
  10. std::cout << f;
  11. std::cout << ((g-1)*e)+f;
  12. }
Success #stdin #stdout 0s 15224KB
stdin
1 10 5 30 4
stdout
5015