Source code for submission s807

Go to diff to previous submission

mosquito.cpp

  1. #include <cstdio>
  2. #include <cstdlib>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int tmp, M, P, L, E, R, S, N;
  10. while (cin >> M >> P >> L >> E >> R >> S >> N)
  11. {
  12. for (int i=0; i<N; i++)
  13. {
  14. tmp = M;
  15. M = P/S;
  16. P = L/R;
  17. L = E * tmp;
  18. }
  19. cout << M << endl;
  20. }
  21. return 0;
  22. }
  23.  
  24.  

Diff to submission s800

mosquito.cpp

--- c4.s800.cteam045.mosquito.cpp.0.mosquito.cpp
+++ c4.s807.cteam045.mosquito.cpp.0.mosquito.cpp
@@ -10,6 +10,5 @@
         while (cin >> M >> P >> L >> E >> R >> S >> N)
         {
-                L = M*E;
-                for (int i=1; i<N; i++)
+                for (int i=0; i<N; i++)
                 {
                         tmp = M;