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