问一下哪里错了,谢谢!!!
查看原帖
问一下哪里错了,谢谢!!!
1500803
liaojiaze7_2楼主2024/12/4 17:16
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	long long cnt=1;
	cin>>n;
	int a=n,b=n;
	while( n!=0 ) {
		while( n!=0 ) {
			cnt*=n;
			n--;
		}
	}
	for( int i=1 ; i<=a ; i++ ) {
		cnt+=i;
	}
	cout<<cnt-b;
	return 0;
}
2024/12/4 17:16
加载中...