Ad
  • Custom User Avatar

    Hello everyone!!! Who knows, tell me what to do, what functions to watch to speed up the code?

  • Custom User Avatar

    From all that has been said, I realized that in the example
    cost = 124
    box = 'mon mon mon mon mon apple mon mon mon mon mon mon mon monme mon mon monme mon mon mon mon cloth monme mon mon mon mon mon mon mon mon cloth mon mon monme mon mon mon mon monme mon mon mon mon mon mon mon mon mon mon mon mon mon'

    is returning

    [45, 5, 345, 6]
    45 - number of mon
    5 - the amount of monme
    345 - the sum of mon and monme
    6 is the amount of tofu that can be bought with 345 coins,
    Maybe I'm wrong, but if 345/124 = ~2
    what does the number 6 mean??

  • Custom User Avatar

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

  • Custom User Avatar

    I didn't quite understand, more precisely
    , whether I understand correctly that the opposite faces differ only by 1 in a greater or lesser direction
    There is a question about 5 and 2, I don't understand how they can be compared with this condition

  • Custom User Avatar

    Guys, thank you for pointing out my mistake, I didn't read the assignment carefully.
    In the function, I worked with the incoming array, but I had to copy and then work with the new array

  • Custom User Avatar

    Either I didn't understand the assignment, or I'm doing something wrong,
    Help please
    Here's what the random test gives out:
    input array was modified: [2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11]
    should equal [2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 9, 11, 11, 11, 11, 11, 11, 11, 11]

    should equal [2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 9, 11, 11, 11, 11, 11, 11, 11, 11] goes away from the logic of the task...

    how is it?????(python)