题解 | #小乐乐求和#
小乐乐求和
http://www.nowcoder.com/practice/ce0b2eacd3d04647831358c2876e44ff
n = int(input()) print(n + (n * (n - 1))//2)
等差数列求和公式就可以
小乐乐求和
http://www.nowcoder.com/practice/ce0b2eacd3d04647831358c2876e44ff
n = int(input()) print(n + (n * (n - 1))//2)
相关推荐