Source code for submission s610

Mosquito.java

  1.  
  2. import java.util.Scanner;
  3.  
  4. /**
  5.  *
  6.  * @author cteam060
  7.  */
  8. public class Main {
  9.  
  10. /**
  11.   * @param args the command line arguments
  12.   */
  13. public static void main(String[] args) {
  14. int i,z;
  15. Scanner sc = new Scanner(System.in);
  16. while(sc.hasNext()){
  17. int m = sc.nextInt();
  18. int p = sc.nextInt();
  19. int l = sc.nextInt();
  20. int e = sc.nextInt();
  21. int r = sc.nextInt();
  22. int s = sc.nextInt();
  23. int n = sc.nextInt();
  24. for(i=0;i<n;i++){
  25. z=m;
  26. m=p/s;
  27. p=l/r;
  28. l=z*e;
  29. }
  30. System.out.println(m);
  31. }
  32.  
  33. }
  34.  
  35. }
  36.