代码
提交代码
def compute(N): sum = 0 i = 1 while i <= N: sum = sum + i i = i + 1 return sum sum = compute(100) print(sum)
运行结果