Ad
  • Default User Avatar

    But the same is with NSEW when you got N=6, S=3, E=1, W=8 you wont be on the same place either. I wouldn't compare this kata to anything concrete. It has got its own rules.

  • Custom User Avatar

    And my only problem is too big of an n.

    But that's YOUR problem (as you say), so the kata isn't broken. Label ISSUE is used for things like broken tests or incorrect description, etc. If it is one of those, then you should provide more information about it.

    To be on the safe side, you should be using 'question' label.

    The author is hinting you that your approach is incorrect (he's the only one who can see your current solution AFAIK)

    you brag about how many people passed the test

    :D no. I believe he's showing you these numbers to prove that kata works as intended and many others didn't experience such problems.

    BTW, if you want real-time help from others, you should try using CW discord channel or gitter (check 'forum' section on the left)

  • Custom User Avatar
  • Default User Avatar
  • Default User Avatar

    Well your approach to aswering is really rude. Instead of helping you just write "Did you read the description?" and after that, you brag about how many people passed the test. It's not my duty to calculate everything exactly like you did. I don't think that's the way katas should suppose to work.

  • Default User Avatar

    I have no hope in getting help as the owner doesnt want users to complete his kata.

    I answered your question in a previous post. You said "could be a problem with truncating my solution with std::round...". Because you used "round" I asked if you read the description: the description asks for "truncating", not for "rounding".
    3716 people passed the kata, 401 with C++ so it is perfectly doable and your problem doesn't come from that.

    In fact I looked at your solution and your problem comes from calculating "factorial n" which gives you lots of floating errors. That is not the good way to pass the kata.
    I won't say more since I want that users can pass the kata but without giving them the solution.

    BTW it's not useful to put lots of issues (the problem is not in the kata but in your code) or to downvote my answers (I can do the same...).

  • Default User Avatar

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

  • Default User Avatar

    I actually wrote it wrong here i dont do round() I did trunc() or floor()

  • Default User Avatar

    What do you mean? Do you even understand my question? Could you please at least tell me how to truncate in c++. What i understand there is no clear way to just cut off the number at a decimal point.

  • Default User Avatar

    Did you read the description?

    return the result truncated to 6 decimal places

    Truncating is not rounding.
    I don't see an issue there, your code doesn't follow the description. Note that 401 people passed the C++ kata.

  • Default User Avatar

    "Expected: equal to 1.275
    Actual: 1.275"

    • could be a problem with truncating my solution with std::round(result*1'000'000)/1'000'000
    • i need long double for this step
    • i tried casting (double)result
  • Custom User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar

    Since you eventually solved the kata, I close the question :)

  • Default User Avatar

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

  • Loading more items...