Ad
  • Custom User Avatar

    This solution could be for Python 2.7 where / was integer division.

  • Custom User Avatar

    I would recommend using the floor division (//) because you might not get a nice even division for every ingredient. Other than that and the other things people already pointed out, this is how I did it as well knowing that there are better and faster methods. I just don't have the experience or knowledge to use them yet.

  • Custom User Avatar

    So I don't understand why I am getting a timeout error. My code works for every case, including the BigInt cases. And it works in ~50ms. How much faster does this code have to run?