• + 0 comments
    def chocolateFeast(n, c, m):
        tot=n//c
        wr=tot
        while wr>=m:
            ch=wr//m
            tot+=ch
            r=wr%m
            wr=r+ch
        return tot