• + 0 comments

    how to run out of memory: it supposed to work, while the n array is small XD

    def solve(n, m):
        tot = 0
        for num in range(1,n+1):
            tot += num%m
        return tot