Source code for submission s690

mosquito.cpp

  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. unsigned int m,p,l,e,r,s,n;
  8.  
  9. while (cin >> m >> p>>l>>e>>r>>s>>n)
  10. {
  11. for(unsigned int week = 0; week < n; week++)
  12. {
  13. unsigned int templ = l;
  14. l = m*e;
  15. m = p / s;
  16. p = templ / r;
  17. }
  18.  
  19. cout << m << endl;
  20.  
  21. }
  22.  
  23. return 0;
  24.  
  25. }
  26.