python计算sigma


from functools import reduce

def sigma(i,j):
    return reduce(lambda a, x: a + x, [0]+list(range(i,j+1)))
    

print(sigma(1,10000))

Comment

*

沪ICP备14014813号-2

沪公网安备 31010802001379号