diff --git a/QUSTOJ/1454.cpp b/QUSTOJ/1454.cpp new file mode 100644 index 0000000..13285c6 --- /dev/null +++ b/QUSTOJ/1454.cpp @@ -0,0 +1,64 @@ +#include +#include +#include +#include +using namespace std; +int a[16][100]; +int main() +{ + a[1][1]=1; + for(int i=2;i<=10;i++) + { + a[i][1]=1; + for(int j=2;j vec; + while(scanf("%d",&n)==1) vec.push_back(n); + for(int ci=0;ci<(int)vec.size();ci++) + { + n=vec.at(ci); + for(int line=n;line>=1;line--) + { + if(vec.size()>2) + { + printf(" "); + } + if(vec.size()>2) + { + for(int k=0;k<(n-line)*3;k++) + { + printf(" "); + } + } + else + { + for(int k=0;k2) + { + printf(" "); + } + else + { + printf(" "); + } + } + printf("%d\n",a[line][line]); + } + printf("\n"); + } + return 0; +}