Accepted
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。
代码
#include <iostream>
#include<iomanip>
using namespace std;
int main()
{
int n;
cin>>n;
int a[n+1][n+1];
for(int i=1;i<=n;i++)
{
a[i][1]=1;
a[i][i]=1;
for(int j=2;j<i;j++)
a[i][j]=a[i-1][j-1]+a[i-1][j];
}
for(int i=1;i<=n;i++)
{
for(int j=1;j<i;j++)
cout<<a[i][j]<<" ";
cout<<a[i][i]<<endl;
}
return 0;
}