• 本题的坑:用循环遍历求和,会超时,性能不好。。。
  • 解决办法,利用求和公式,巧妙的解决。。。。
x = int(input())
sum_1 = (1+x)*x/2
print(int(sum_1))