ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1400. Cellular Characters

Alexey Dergunov [Samara SAU] Attention to Java coders, or please fix the checker [2] // Problem 1400. Cellular Characters 9 Jul 2012 16:15
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
surprisingly this is the case.
Sandro (USU) Checker is fixed (-) // Problem 1400. Cellular Characters 10 May 2013 15:28