Epikem's blog

By Epikem, history, 6 years ago, In English

In my IDE, my console prints good answer ( 12.5663706143592 ) But when I submit, jury says like below.

Time: 46 ms, memory: 40 KB



3 0 0

0 1

-1 2

1 2

Participant's output


Jury's answer


Checker comment

wrong output format Expected double, but "12,5663706143592" found

I tried many encoding settings — including ASCII, Unicode, UTF-8 — because I thought it is encoding problem. However, all submission ended up with this failure.

I'm using C# and submitted as MS C#.

I hope this problem to be fixed soon so other's don't suffer assuming incomprehensible cause of test failure.



[Edit] There is a solution using CultureInfo but still it seems unnecessary workaround to me. (thanks to fr0st)

string answer = ans.ToString(CultureInfo.InvariantCulture); Console.WriteLine(answer);

Read more »

Tags c#
  • Vote: I like it
  • +6
  • Vote: I do not like it