• + 0 comments
    def howManyGames(p, d, m, s):
        ans=0
        while s>=p:
            s-=p
            ans+=1
            p-=d
            if p<m:
                p=m
        return ans