In first submission,I use implicit conversion:double to string.As a result,It was WA.Output is:
2 6 9,87298334620742 13,3370849613452 12,518734657272 13,3370849613452
Next,I decide to use substitute methods like this:
static string doubleToString(double d)
{
int s = (int)d;
string a = Convert.ToInt32((d - s) * 1000000000).ToString().PadLeft(9, '0');
return $"{s}.{a}";
}
and it was AC.
So obviously,