20分求助!!!
查看原帖
20分求助!!!
1070491
Kmeow楼主2024/2/23 12:09
#include <bits/stdc++.h>
using namespace std;
int n; 
int s[110][110];
int main(){
	s[1][1]=1;
	cin>>n;
	for(int i=2;i<=n;i++)
		for(int j=1;j<=i;j++)
			s[i][j]=s[i-1][j-1]+s[i-1][j];
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=i;j++)
			cout<<s[i][j];
		cout<<endl;
	}
}

我的小小小代码

就第四个点AC了

why not right?

2024/2/23 12:09
加载中...