Ad
  • Custom User Avatar

    There's a buffer overflow when n is 5, because "2^3 * 3 * 5" needs 12 bytes (including null byte), but the buffer only has space for 11 (n*2+1) bytes. Similary (often worse) for many other values of n.

  • Default User Avatar

    This Kata seemed boring at first sight to be honest but it was entretaining and refreshing at the end :D

  • Default User Avatar

    this is so clever! I'm learning a lot from Codewars! :D

  • Default User Avatar

    Haskell translation
    Happy to change anything you feel should be different, nitpick all you want.

    edit: oops. I missed corrupting the bits. so uh yeah. that needs to happen.. tomorrow
    edit2: tomorrow became "after tea" all better now.

  • Custom User Avatar

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

  • Default User Avatar

    I loved this kata, made me realize that I've got some skills with bits and ascii but I wasted a lot of time just because I didn't calculate the output lenght correctly, any tips so this won't happen again? For C language, I gave it more than I sould have and then placed the '\0' character way after the end of the string, thus printing garbage chars.

  • Default User Avatar

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

  • Default User Avatar

    This is what makes Codewars so great!

  • Default User Avatar

    approved by someone

  • Default User Avatar

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

  • Default User Avatar

    Hey hobovsky, I finally understood what was wrong with my solution and finally got to use integers only. I just want to add for future reference, for any warrior with the same problem:

    if you see this and you are using double or float types, it's wrong, TRY USING INTEGERS, is the only way. You can see above that I've tried in so many ways with floats and doubles but IT DOES NOT WORK.

    So, yeah try again using ints.

    Thanks a lot for your time hobovsky!

  • Default User Avatar

    try again using integers only, belieave me, it's the only way. I tried using float and double and the only "other" way is using double but adding a hardcoded amount of 0.000002 or something like that, which is not correct.

  • Default User Avatar

    I think I get it now, it's like seeing them like:
    1:15:59 and 2:03:17

    So the difference is:
    00:47:18

    Great! thanks a lot, like I said I misunderstood the description.

  • Default User Avatar

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

  • Default User Avatar

    Hello, I'm stuck with the tests too, I think I'm understanding the problem in the wrong way but here's my question anyway:

    From your example on the problem's description, How do you get a range of 00 for a set of {01,01,01,01,02} hours, isn't it supposed to be 01 (highest:02 - lowest:01)?
    "01|15|59, 1|47|6, 01|17|20, 1|32|34, 2|3|17"

    "Range: 00|47|18 Average: 01|35|15 Median: 01|32|34"

    From how I understand the problem, to get a range of 00 you'd need to have a full set of runners taking 2 hours min each.

    I have kind of the same question for everything else (all tests), I'm getting all the tests wrong but I think my solution is right, at least for the description I understood.

    It's been a really fun and refreshing kata aside from that issue.

  • Loading more items...