Ad
  • Custom User Avatar

    Problem is not with printing inputs in C++, but with printing inputs on Codewars. There's no clearly visible console or output area, and users do not know printing is possible. Let's be honest, the test output panel as it looks now does not make the impression that "Aha! I will be able to see my logs there!".

    Okay, this could be somewhat language specific because in some frameworks, output can be incomplete while abruptly crashing and needs to be explicitly flushed, but it's not really specific to C++. Additionally, when a crash occurs early in tests, it can result in no logs being printed at all, additionally enforcing the impression that printing does not work. But other languages/test frameworks suffer from this problem too.

  • Custom User Avatar

    There should be no floating point repesentation issues. Order of evaluation is defined, so there should be no ambiguity.

    It is quite possible that expected values or reference implementations use wrong orders internally, but this problem should be solved correctly. Using fixed point libraries is not the correct solution.

    Closing.

  • Custom User Avatar

    Isn't it possible to print inputs in C++?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution