TLE里说丰年
查看原帖
TLE里说丰年
1667885
zhouyifan111楼主2025/7/21 16:50
#include <bits/stdc++.h>
using namespace std;
int n;
long long he; 
int main(){
cin>>n;
for(int i=1;i<=n;i++){
	for(int j=1;j<=i;j++){
		he=0;
		for(int k=1;k<=j;k++){
			he+=k;
		}
	}
	cout<<he<<"\n";
}
return 0;
}

2025/7/21 16:50
加载中...