悬关救命!40分
查看原帖
悬关救命!40分
977778
__Harry_Haiyun__楼主2023/8/23 21:52
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e6+7;
int main()
{
 	int n;
 	cin >> n;
 	int sum = 0,temp = 1;
 	for (int i = 1; i <= n; i++)
 	{
 		for (int j = 1; j <= temp; j++,i++)
	 		sum += temp;
	 	temp++;
	}
	cout << sum;
 	return 0;
}
2023/8/23 21:52
加载中...