Source code for submission s596

mosquito.cpp

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