|
|
вернуться в форумTime limit excess on test 9 (please help) this is my program, it can't be easier i think so, but i'm a new Java programmer, this is my program, please help to make it work faster! import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class isquaresol { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner(System.in); double a[] = new double[150000]; int i = 0; for (; ;) { a[i] = Math.sqrt(input.nextDouble()); i++; if (! input.hasNext()) break; }
for (int j = i - 1; j >= 0; j--) { System.out.format("%.4f%n", a[j]); } } } |
|
|