Ad
  • Custom User Avatar

    fcurz, I think I made my point

  • Custom User Avatar

    As much as I agree with the general message, we still have to take care of the language on the platform and i need to hide the comment.

  • Custom User Avatar

    This comment has been reported as abusive

  • Custom User Avatar

    you have 3 point, buy two items, now you have 5 points, which is enough to get the last item for free, after which you have no more points available

  • Default User Avatar
  • Custom User Avatar

    This is the coolest and most clever solution I've seen on this website so far.
    Well Done!

  • Custom User Avatar

    I would totally agree with you if I knew English better. But when I put those words into a translator, they came out with the same meaning

  • Default User Avatar

    I agree. The description should replace "equidistant" with "evenly spaced", in my opinion. "Equidistant" had me picturing groups where all members were the same distance from each other, which would limit the groups to sizes of 1, 2, or 3.

  • Custom User Avatar

    The thing I lke the most is your gcd function.

  • Custom User Avatar

    What is y[] used for ?

  • Default User Avatar

    You have two chocolate bars. Each chocolate bar has portraits on it, but not necessarily in the same order. Your goal is to break the second chocolate bar as few times as possible in order to put the portraits in the same order as in the first bar. Each portrait is represented by a number from 1 to n.

    For the example given:

    first bar
    |4|3|2|5|1|

    second bar
    |1|2|5|3|4|

    There are three breaks you have to make in order to assemble the pieces in the correct order. One break between the 1 and 2, one between the 5 and 3, and one between the 3 and 4. That leaves you with the four pieces:

    |1| + |2|5| + |3| + |4|

    which can be rearranged to match the first bar:

    |4| + |3| + |2|5| + |1|

    I hope that makes sense.

  • Custom User Avatar

    damn, maybe I'm bad, but for me, reading discussions is much more interesting than reading books or watching TV shows, hopes are crumbling right before our eyes and destinies are changing)

  • Default User Avatar

    Don't make me beg you like my brawl stars account was stolen

  • Custom User Avatar
  • Custom User Avatar

    Insert the "well well well, what is it if not consequences of my own actions" meme.

    I am not going to unblock your account. You can wait until admins take a look at this behaviour and judge, or you can write an email to info@codewars.com and ask for help.

  • Loading more items...