• + 0 comments

    Solution From my side

    def howManyGames(p, d, m, s):
        results = []
        results.append(p)
        while(sum(results)<=s):
            if(p>m and (p - d)>m):
                p = p - d
                results.append(p)
            else:
                results.append(m)
        return len(results)-1