Source code for submission s667

Mosquito.java

  1. import java.io.*;
  2.  
  3. public class Mosquito {
  4. public static void main(String[] args) throws Exception {
  5.  
  6. int length;
  7. int count;
  8.  
  9. while(true)
  10. {
  11. String line = in.readLine();
  12. if(line == null) break;
  13.  
  14. String data[] = new String[7];
  15.  
  16. data = line.split(" ");
  17.  
  18. Integer M = new Integer(data[0]);
  19. Integer P = new Integer(data[1]);
  20. Integer L = new Integer(data[2]);
  21. Integer E = new Integer(data[3]);
  22. Integer R = new Integer(data[4]);
  23. Integer S = new Integer(data[5]);
  24. Integer N = new Integer(data[6]);
  25.  
  26.  
  27.  
  28. for(int i=0; i<N;i++){
  29. int pom=M;
  30. M=P/S;
  31. P=L/R;
  32. L=pom*E;
  33. }
  34.  
  35.  
  36. System.out.println(M);
  37.  
  38.  
  39. }
  40. }
  41. }
  42.