#include <iostream> using namespace std; int main() { double n; cin>>n; long long sum = 0; sum = (1+n)*n/2; cout<<sum; return 0; }
BEGIN-2 序列求和
原文:https://www.cnblogs.com/ZCWang/p/12158829.html