Source code for submission s590

mosquito.cpp

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