• + 0 comments
    def howManyGames(p, d, m, s):
        # Return the number of games you can buy
         
        count = 0 
        i = p
        
        while s - i >= 0:
            count += 1
            s -= i
            i = max(m, i - d )
                       
        return count