Source code for submission s784

mosquito.cpp

  1. #include<cstdlib>
  2. #include<cstdio>
  3. #include<cstring>
  4.  
  5. int main()
  6. {
  7. int EGGS=0,M=0,P=0,L=0,E=0,R=0,S=0,N=0;
  8. int EGGSNEW=0,M1=0,P1=0,L1=0;
  9.  
  10. while(scanf("%d%d%d%d%d%d%d",&M,&P,&L,&E,&R,&S,&N)==7)
  11. {
  12. for(int i=1;i<=N;i++)
  13. {
  14. EGGSNEW = M*E;
  15. L1 = EGGSNEW;
  16. P1 = L / R;
  17. M1 = P/ S;
  18.  
  19. EGGS = EGGSNEW;
  20. L = L1;
  21. P = P1;
  22. M = M1;
  23.  
  24. }
  25. printf("%d\n",M);
  26. }
  27.  
  28.  
  29.  
  30. return 0;
  31. }
  32.  
  33. /*
  34.  
  35. for(int i=0;i<10;i++)
  36. {
  37.  
  38. }
  39.  
  40. scanf("%d",&);
  41. printf("%d");
  42.  
  43.  
  44.  
  45. */
  46.