Source code for submission s821

Mosquito.java

  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4. import java.util.Scanner;
  5.  
  6. public class Mosquito {
  7.  
  8. public static void main(String[] args) {
  9. String line;
  10. while(true){
  11. try {
  12. line = br.readLine();
  13. if(line==null) break;
  14. Scanner sc = new Scanner(line);
  15. long M = sc.nextInt();
  16. long P = sc.nextInt();
  17. long L = sc.nextInt();
  18. long E = sc.nextInt();
  19. long R = sc.nextInt();
  20. long S = sc.nextInt();
  21. long N = sc.nextInt();
  22. long V = 0;
  23. for(int i=0; i<N;++i){
  24. long sM = M;
  25. M = P/S;
  26. P = L/R;
  27. L = sM*E;
  28. }
  29. System.out.println(M);
  30. } catch (Exception e) {
  31. //e.printStackTrace();
  32. return;
  33.  
  34. }
  35. }
  36.  
  37. }
  38.  
  39. }
  40.