Source code for submission s727

mosquito.c

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