Source code for submission s976

Fl.java

  1. import java.util.Scanner;
  2.  
  3.  
  4. public class Fl {
  5.  
  6. static String [] vstup = new String[2];
  7.  
  8. public static void main(String[] args) {
  9. Scanner sc = new Scanner(System.in);
  10.  
  11. while(sc.hasNextLine()){
  12. vstup = sc.nextLine().split("/");
  13. int celkem = 0;
  14.  
  15. int n = Integer.parseInt(vstup[1]);
  16.  
  17. int y = 1;
  18.  
  19. for (int i = n + 1; i <= 2*n ; i++) {
  20.  
  21. int a = n - i;
  22. int b = n * i;
  23.  
  24.  
  25. if(b%a == 0){
  26. celkem++;
  27. }
  28. }
  29.  
  30. System.out.println(celkem);
  31. }
  32.  
  33. }
  34.  
  35. }
  36.