fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int m, a, p, w, t=0;
  6. cin >> m >> a >> p >> w;
  7. while(m<a)
  8. {
  9. int m=m+p;
  10. int a=a-w;
  11. t++;
  12. }
  13. cout << t;
  14.  
  15.  
  16. return 0;
  17. }
Time limit exceeded #stdin #stdout 5s 3296KB
stdin
Standard input is empty
stdout
Standard output is empty