提交时间:2026-05-30 16:00:57
运行 ID: 442850
#include<bits/stdc++.h> using namespace std; int main(){ int k,n=0,s=0; cin>>k; while(1){ n++; for(int i=1;i<=n;i++){ s+=n; k--; if(k==0){ cout<<s; return 0; } } } return 0; }