mosquito.c
#include <stdio.h>
int main(){
int M,P,L,E,R,S,N,i,Mi,Pi,Li;
while(scanf("%d%d%d%d%d%d%d",&M
,&P
,&L
,&E
,&R
,&S
,&N
)!=EOF
){ /* printf("%d|%d|%d|%d|%d|%d|%d\n",M,P,L,E,R,S,N);*/
for(i=1;i<=N;++i){
Li=M*E;
Pi=L/R;
Mi=P/S;
M=Mi;
P=Pi;
L=Li;
/*printf("%d|%d|%d|%d|%d|%d|%d\n",M,P,L,E,R,S,N);*/
}
}
return 0;
}