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))
python计算sigma
Posted
in
by
Tags:
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))
Posted
in
by
Tags:
Leave a Reply