• + 0 comments

    Here is my Python solution!

    def howManyGames(p, d, m, s):
        games = 0
        while True:
            if p > s:
                return games
            s -= p
            p = p - d if p - d >= m else m
            games += 1