Source code for submission s639

Fl.java

  1. import java.io.InputStreamReader;
  2. import java.io.BufferedReader;
  3.  
  4. public class Fl
  5. {
  6. public static void main(String[] args) throws Exception
  7. {
  8. for (int x = 1; x <100;x++)
  9. {
  10. for (int y = 1; y <100;y++)
  11. {
  12. if (8*y +8*x == x*y)
  13. {
  14. //:System.out.println(x + " " + y);
  15. }
  16.  
  17. }
  18.  
  19. }
  20.  
  21. while (br.ready())
  22. {
  23. String s1 = br.readLine();
  24. long n = Integer.parseInt(s1.split("/")[1]);
  25. int count = 0;
  26. //if (n=1)
  27. for (long x = n+1; x <= 2*n; x++)
  28. {
  29. if (n*x % (x-n) != 0) continue;
  30. count++;
  31. //System.out.println(x + " "+ n*x / (x-n));
  32. }
  33. //count = ((count -1)/2) + 1;
  34. System.out.println(count);
  35.  
  36.  
  37. }
  38. }
  39. }
  40.