Source code for submission s641

mosquito.cpp

  1. #include <cstdlib>
  2. #include <cstdio>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. int main () {
  8. int M,P,L,E,R,S,N,lastM;
  9.  
  10. while (scanf("%d%d%d%d%d%d%d\n",&M,&P,&L,&E,&R,&S,&N)==7) {
  11. for (int i = 1; i <= N; i++) {
  12. lastM = M;
  13. M = P/S;
  14. P = 0;
  15.  
  16. P = L/R;
  17. L = 0;
  18.  
  19. L = lastM*E;
  20. }
  21. cout << M << endl;
  22. }
  23. return 0;
  24. }
  25.