|
|
вернуться в форумAttention to Java coders, or please fix the checker This code gets WA 1: Locale.setDefault(Locale.US); ... out.printf("Mean = %.2f\n", (double)bestSum / total); And this one gets AC: Locale.setDefault(Locale.US); ... StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); pw.printf("Mean = %.2f", (double)bestSum / total); pw.flush(); String str = sw.getBuffer().toString(); pw.close(); out.println(str); Oh, I've found the reason: their checker is bad and you should use "Mean = %.2f\r\n" (with '\r'!), not "Mean = %.2f\n". Edited by author 09.07.2012 16:19 Re: Attention to Java coders, or please fix the checker surprisingly this is the case. |
|
|