Go to diff to previous submission
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package fl; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; /** * * @author kuric10 */ public class Main { /** * @param args the command line arguments */ // TODO code application logic here /* BufferedReader input= new BufferedReader(new InputStreamReader(System.in)); String s;*/ int citatel, menovatel; int max; int counter; double tolerancia=0.00000001; double pom; String s; while(input.hasNextLine()){ counter=0; s=input.nextLine(); //citatel=input.nextInt(); max=menovatel*3; /* for (int i = menovatel; i < max; i++) { for (int j = i+1; j < max; j++) { if(i*j/(i+j)==menovatel) } }*/ for (int i = menovatel+1; i < max; i++) { pom=(menovatel*i*1.0)/(i-menovatel); if(pom<0 || i>pom)continue; counter++; } } } } }
--- c5.s706.cteam085.fl.java.0.Main.java +++ c5.s711.cteam085.fl.java.0.Main.java @@ -37,5 +37,5 @@ //citatel=input.nextInt(); menovatel=Integer.parseInt(s.substring(2)); //input.nextInt(); - max=menovatel*10; + max=menovatel*3; /* for (int i = menovatel; i < max; i++) { for (int j = i+1; j < max; j++) {