Ad
  • Default User Avatar

    No answer. Since TCAU says "good problem" I consider the issue as resolved.

  • Custom User Avatar

    Can we get some more details as to what is not working?

  • Default User Avatar

    I improved the solution in other languages:-) Thank for the feedback!

  • Default User Avatar

    As a comment on my solution I explained how this problem can be solved without going through the entire series from i = 1 to n, just by applying a limited amount of equations. This results in a solution which needs less calculation power (I got around 2300 ms when going through the series, and around 1400 ms with the 'optimized solution'.) As you gave the suggestion to optimize the solution, this problem would just get that extra edge, and increase the difficulty slightly, if such an optimized solution was actually needed in order to fulfill the kata.

  • Default User Avatar

    I don't understand what you mean. Please can you be more explicit?

  • Custom User Avatar

    C# part doesn't work just yet. Good problem.

  • Default User Avatar

    Thanks for your feedback!

  • Custom User Avatar

    Nevermind I got found out what the issue was. Thanks for your help!

  • Default User Avatar

    It's not in the habit of Codewars to give the tests, sorry for that:-(
    2nd test is absolutely ordinary, no edge case.

  • Custom User Avatar

    Meh it still won't work for some reason. Could I have the parameters used for the second test upon submission? Could be an edge case that I didn't cover yet.

  • Default User Avatar

    I don't see anything special in 2nd test! Maybe Codewars was too busy, it happens:-(

  • Custom User Avatar

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

  • Custom User Avatar

    There's a bug in the C# version.

    Assert.AreEqual(Kata.Maskify("4556364607935616"), "############5616");

    ExamplesTests
    Expected string length 28 but was 16. Strings differ at index 12. //should only have 16 characters
    Expected: "############4556364607935616" // should only have last four digits unmasked
    But was: "############5616"
    -----------------------^