大佬帮忙看一下哪里错了
查看原帖
大佬帮忙看一下哪里错了
1437457
czp5900楼主2024/10/5 08:03

大佬帮忙看一下哪里错了

#include<bits/stdc++.h>     
using namespace std;  
int main()  
{  
	int n;  
	cin >> n;  
	int s=0;  
	for(int i =1;i<n;i++){  
	    s+=n*(n-i);  
	      cout << s;   
	    }
	    
    return 0;
}
2024/10/5 08:03
加载中...