• + 1 comment

    That's basically what I did, except in Python.

    choc, wrappers = [int(n/c), int(n/c)]
    while (wrappers >= m):
        choc+= 1
        wrappers -= m
        wrappers += 1
    print(choc)