Ad
  • Default User Avatar

    approved

  • Default User Avatar

    The printf() calls in your solution allocate memory on the heap, which I had not foreseen when detecting memory leaks. Should be good now, your code passes the tests.

  • Default User Avatar

    C: Are there any known issues with the tests for freeing memory? I'm fairly confident in my solution, but I'm failing on test memory_should_be_freed with the error "you allocated more memory than you freed".

  • Custom User Avatar

    Nice one, had a lot of fun with it :)

  • Custom User Avatar

    Random tests for JavaScript have been added.

  • Custom User Avatar

    approved

  • Default User Avatar

    JS fork

    • adding random tests
    • upgrading to chai assertions
    • better assertion messages
  • Default User Avatar

    this will not be done because a) banning things is very difficult in Python and b) similar measures would have to be taken in every language that has a networking library available, which is almost all of them.

  • Default User Avatar

    added here + upgrading to chai

  • Custom User Avatar

    Thanks, you helped!

    I will next time. I was confused and really thought there was an issue :/

  • Default User Avatar

    fixed. your solution fails both the random and fixed tests consistently now

  • Default User Avatar

    your solution writes past the end of the output buffer: you are printing a trailing '.', and then erase it. this is not robust: the worst-case output size is 16 i.e. strlen("100.100.100.100") + 1, so the caller of the function can expect that 16 bytes should be enough, but your solution needs more bytes than that. as a result of writing out-of-bounds, you corrupt the tests suite

  • Default User Avatar

    it is your code that is wrong: you are adding trailing zeroes instead of leading zeroes to the binary string. please ask a question in the future instead of raising an issue ;-)

  • Default User Avatar

    no, the problem comes from your code. you are assuming that the binary string you create is always 32 chars long, this is not true.

    Please ask a question (not an issue) to ask for help in the future ;-)

  • Default User Avatar

    Is it possible to implement this in Kotlin? When attempting a logical AND operation, garbage is returned. When I look at the code that compiles in Java, there is a completely wrong idea.
    UPD:Implemented via string. But the test fails. Error with ip: 89.118.64.172.
    In 10th representation it is 1500922028.
    In the 2nd representation - 10110010111011001000000101011000. The first 8 bits 10110010 = 178. Am I missing something or is there an error in the tests?

  • Loading more items...