Source code for submission s487

FL.java

  1.  
  2. import java.io.BufferedReader;
  3. import java.io.IOException;
  4. import java.io.InputStreamReader;
  5.  
  6. /*
  7.  * To change this template, choose Tools | Templates
  8.  * and open the template in the editor.
  9.  */
  10.  
  11. /**
  12.  *
  13.  * @author cteam94
  14.  */
  15. public class FL {
  16. public static void main(String[] args) throws IOException {
  17.  
  18. while(readLine(br));
  19. }
  20.  
  21. public static boolean readLine(BufferedReader br) throws IOException {
  22. String line = br.readLine();
  23. if (line == null) return false;
  24.  
  25. String[] sp = line.split("/");
  26. int n = Integer.parseInt(sp[1]);
  27. int c = 0;
  28.  
  29. for (int x = n + 1; x <= 2*n; x++) {
  30. if (x*n % (x-n) == 0) c++;
  31. }
  32. System.out.println(c);
  33.  
  34. return true;
  35. }
  36. }
  37.