Source code for submission s718

mosquito.cpp

  1. #include <stdio.h>
  2. #include <limits.h>
  3. #include <iostream>
  4.  
  5.  
  6. int main()
  7. {
  8.  
  9. int M, P, L, E, R, S, N;
  10. while(scanf("%d %d %d %d %d %d %d\n", &M, &P, &L, &E, &R, &S, &N)==7)
  11. {
  12.  
  13. for (int i=0; i<N; i++)
  14. {
  15. int lM=M;
  16. int lP=P;
  17. int lL=L;
  18. M=lP/S;
  19. L=lM*E;
  20. P=lL/R;
  21. }
  22. printf("%d\n", M);
  23. }
  24.  
  25. return 0;
  26. }
  27.