|
|
back to boardwhy this java solution is wrong? (WA) Locale.setDefault(Locale.US); ArrayList<Double> res = new ArrayList<Double>(); while (hasNext()) { double a=nextDouble(); res.add(Math.sqrt(a)); } Collections.reverse(res); for (double a : res) { DecimalFormat df=new DecimalFormat("0.0000"); System.out.println(df.format(a)); } Judge status shows that this failed in test case 1. |
|
|