Ad
  • Custom User Avatar

    Sorry about that, no excuses other than a brainfart on my part (in my defense I had a few drinks during the translation lol) I'll fix it ASAP

  • Custom User Avatar

    haha so much for "eval" not being included with JavaScript. When i first read the kata I thought it would be super easy because this solution was an option, but then i read that eval was disabled so I did a much longer one. Wish I would have just done this since obviously it's not disabled.

  • Custom User Avatar

    Seriously whoever did the C# version, PUT IN THE DESCRIPTION THAT BIGINTEGER ISN'T ALLOWED. Multiple people have said it.

  • Custom User Avatar

    As a hint for those struggling, the description leaves out that you should assume if the bill given is a 100, a 50 should be given first priority for giving out change. If you assume this then the solution should be fairly simple.

  • Custom User Avatar

    Still unable to find out why the htmlize function doesn't work with codewars but does on other platforms, but I'll look into it and update whenever i find a solution.

  • Custom User Avatar

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

  • Custom User Avatar

    Probably an somewhat-unexpected place to include this would be after the multiplier is performed. Such as when a value of 150 is intially retrieved but after the multiplier becomes 300, but every other value in the string is less than 255. I'll have to think about how to implement that. Thanks again for the suggestion.

  • Custom User Avatar

    After looking at your solution, I wish I would have added an error case where the end value came before the start value. For example, what if the start value was 5, the end value was 19, but the binary string was [22,19,7,14,5]? Ah well, too little too late lol

  • Custom User Avatar

    Sounds good, thanks for the suggestion! I'll work on it.

  • Custom User Avatar

    There are some problems with a couple of the test cases. Some of the test cases are able to return multiple values, and there is no explanation in the description as to which value to return in this case (specifically working with C#, i don't know if this is an issue in other languages).

    A great example is "? times 11 = ??". ANY number except for 0 and 1 works.
    Another one I'm running into trouble with is "-5? times -1 = 5?". Any number except for 5 and 1 will work.

  • Custom User Avatar

    Thanks for the feedback! Since this was my first Kata I'm glad you liked it.

  • Custom User Avatar

    Thanks for fixing this issue.

    I actually initially coded this solution in C#, and after getting the 22/0/1 response to the test cases I switched to Java (since I didn't use LINQ it wasn't really difficult) and tried again. I got another error, then refreshed the page, pasted in my solution and it passed. So I guess after refreshing the page the test cases for my Java solution went into the 25% category lol.

    I'll retry my C# solution now that you say it's fixed. Thanks again.

  • Custom User Avatar

    One of the random tests uses a large negative value (i.e. -1275939367) and throws an error. I tried to get around this error by just saying return -1 if the input is less than 0, but then it said the expected return was a large negative number as well. I keep getting 22 pass, 0 fail, 1 error because of this error. Please fix it.