Go to diff to previous submission
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ //package fs; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * * @author cteam039 */ public class Fl { try { while (line != null) { int n = 1; try{ return; } // System.out.println("n: " + n); int counter = 0; for (int i = n + 1; i <= n * 2; i++) { double x = (n * i) / ((double) (i - n)); int iXd = (int) x; int iXu = (int) (x) + 1; counter++; } } line = reader.readLine(); } } } }
--- c5.s670.cteam039.fl.java.0.Fl.java +++ c5.s683.cteam039.fl.java.0.Fl.java @@ -36,5 +36,5 @@ int iXd = (int) x; int iXu = (int) (x) + 1; - if ((Math.abs(x - iXd) < 1.0 / (n * n * n * n)) || (Math.abs(x - iXu)) < 1.0 / (n * n * n * n)) { + if ((Math.abs(x - iXd) < (0.000001)) || (Math.abs(x - iXu)) < (0.000001)) { counter++; }