|
|
вернуться в форум[java] Wrong answer test 3 - what is going on ? Послано Zawi 21 июл 2012 20:09 I do not understand what is wrong with my code it works ok on my PC: public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in, "ISO-8859-1")); char[] buffer = new char[262144]; br.read(buffer); Scanner in = new Scanner(new String(buffer)); Stack<String> lifo = new Stack<String>(); DecimalFormat format = new DecimalFormat("0.00000", new DecimalFormatSymbols(Locale.US)); while (in.hasNextLong()) { lifo.push(format.format(Math.sqrt(in.nextLong()))); } while(!lifo.empty()){ System.out.println(lifo.pop()); } } Could someone explain it to me ? Re: [java] Wrong answer test 3 - what is going on ? Edited by author 30.09.2012 19:33 |
|
|