提交时间:2026-05-30 16:05:26

运行 ID: 442851

#include<bits/stdc++.h> using namespace std; int main(){ int k,s=0,n=0,i; cin>>k; while(1){ n++; for(i=1;i<=n;i++){ s+=n; k--; if(k==0){ cout<<s; return 0; } } } }