80分带代码,2,8数据点没过,WA
查看原帖
80分带代码,2,8数据点没过,WA
746368
Lve_Zxy楼主2022/7/29 11:24
using namespace std;
int n,cur=0;;
void dg(int x){
	if(x!=0){
		cur+=x;
		x--;
		dg(x);
	}
	else return;
}
main(){
	ios::sync_with_stdio(0);
	scanf("%d",&n);
	dg(n);
	cout<<cur-1;
}
2022/7/29 11:24
加载中...