呜呜呜,求救
查看原帖
呜呜呜,求救
589776
shenyuze楼主2021/12/5 13:31
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b=0,i=1,day=0;
	cin>>a;
	while(i<=a)
	{
		for(int x=1;x<=i;x++)
		{
		b=b+x;
		day++;
		}
		i++;
		if(day==a) break;
	}
	cout<<b;
}

怎么了???

2021/12/5 13:31
加载中...