C++代码(1)
2022-04-06 12:51
views:
669
source:
hwj
#include<iostream>
#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;
}
Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.