Source code for submission s775

Mosquito.java

  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5.  
  6. package acm;
  7.  
  8. import java.util.Scanner;
  9.  
  10. /**
  11.  *
  12.  * @author cteam030
  13.  */
  14. public class Mosquito {
  15.  
  16. public static void main(String[] args) {
  17.  
  18. Scanner sc = new Scanner(System.in);
  19.  
  20. while(sc.hasNext())
  21. {
  22. int m = sc.nextInt();
  23. int p = sc.nextInt();
  24. int l = sc.nextInt();
  25. int e = sc.nextInt();
  26. int r = sc.nextInt();
  27. int s = sc.nextInt();
  28. int n = sc.nextInt();
  29.  
  30. int ec = 0;
  31.  
  32. for (int i = 0; i < n; i++)
  33. {
  34. ec = m*e;
  35. m = p / s;
  36. p = l / r;
  37. l = ec;
  38. }
  39.  
  40. System.out.printf("%d%n", m);
  41. }
  42. }
  43. }
  44.