提交时间:2025-07-20 22:10:39

运行 ID: 334870

#include<bits/stdc++.h> using namespace std; int main(){ int k,n=0,s=0; cin>>k; while(1){ n++; //连续 N 天每天收到 N 枚金币 for(int i=1; i<=n; i++){ s=s+n; k--; if(k==0){ cout<<s; return 0; } } } return 0; }