C++代码(1)
#include<Windows.h>
using namespace std;
int main()
{
int tian,jinbi=1,lj=0,jblj=1,ci;
cin>>tian;
ci=jinbi;
while(tian)
{
while(ci and tian)
{
lj+=jinbi;
tian--;
ci--;
}
jblj++;
ci=jblj;
jinbi=jblj;
}
cout<<lj<<endl;
system("color 3B");
return 0;
}