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

Attention to Java coders, or please fix the checker
Posted by Alexey Dergunov [Samara SAU] 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
Re: Attention to Java coders, or please fix the checker
Posted by gautamvs 16 Feb 2013 10:05
surprisingly this is the case.
Checker is fixed (-)
Posted by Sandro (USU) 10 May 2013 15:28