题解 | #牛牛的西格玛#
牛牛的西格玛
https://www.nowcoder.com/practice/c6b750ee8853484f8dbf14b9531b501f
def sum(n): if n==1: return 1 else: return n+sum(n-1) n=int(input()) print(sum(n))
牛牛的西格玛
https://www.nowcoder.com/practice/c6b750ee8853484f8dbf14b9531b501f
def sum(n): if n==1: return 1 else: return n+sum(n-1) n=int(input()) print(sum(n))
相关推荐