Go to diff to previous submission
#include <iostream> #include <stdlib.h> #include <stdio.h> using namespace std; int main(void) { int M,P,L,E,R,S,N,dump; while(scanf("%d %d %d %d %d %d %d",&M, &P, &L, &E, &R, &S, &N) == 7) { for (int i=1; i<=N; i++) { dump = L; L = M*E; M = P/S; P = dump/R; } cout << M << endl; } return 0; }
--- c4.s607.cteam001.mosquito.cpp.0.mosquito.cpp +++ c4.s631.cteam001.mosquito.cpp.0.mosquito.cpp @@ -6,11 +6,11 @@ int main(void) { - int M,P,L,E,R,S,N; + int M,P,L,E,R,S,N,dump; while(scanf("%d %d %d %d %d %d %d",&M, &P, &L, &E, &R, &S, &N) == 7) { for (int i=1; i<=N; i++) { - N--; + dump = L; L = M*E; M = P/S; - P = L/R; + P = dump/R; } cout << M << endl;