Source code for submission s789

mosquito.c

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