Source code for submission s594

mosquito.cpp

  1. //
  2. // File: mosquito.cc
  3. // Author: cteam053
  4. //
  5. // Created on October 27, 2012, 11:06 AM
  6. //
  7.  
  8. #include <stdlib.h>
  9. #include <cstdio>
  10. #include <cmath>
  11. #include <climits>
  12. #include <iostream>
  13.  
  14. using namespace std;
  15.  
  16. long long int M, P, L, E, R, S, N;
  17.  
  18. long long int computeM () {
  19. long long int prevL;
  20.  
  21. for (int i=0; i<N; i++) {
  22. prevL=L;
  23.  
  24. L=M*E;
  25. M=P/S;
  26. P=prevL/R;
  27. }
  28.  
  29. }
  30.  
  31.  
  32. int main(int argc, char** argv) {
  33.  
  34. while(scanf("%d%d%d%d%d%d%d", &M, &P, &L, &E, &R, &S, &N) == 7){
  35. computeM();
  36. printf ("%d\n", M);
  37.  
  38. }
  39.  
  40. return (0);
  41. }
  42.  
  43.