Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128978 fkccf 杨辉三角 C++ 通过 100 0 MS 264 KB 505 2024-01-26 14:36:17

Tests(2/2):


#include<bits/stdc++.h> #define _(e...) ({e;}) #define x(a,e...) _(auto x=a;e) #define $(a,e...) if(a){e;}else #define i(n,e...) {int $n=n;int i=0;for(;i<$n;++i){e;}} #define DBG(a...) //_(a) using I=int; #define dg isdigit(c=getchar()) I rd(){int c;while(!dg);I x=c-'0';while(dg)x=x*10+c-'0';return x;} const I N=110;long long c[N][N]; int main(){I n=rd();printf("1\n");c[1][1]=1; for(int i=2;i<=n;i++){for(int j=1;j<=i;j++)printf("%lld ",c[i][j]=c[i-1][j]+c[i-1][j-1]);puts("");} return 0;}


测评信息: