题解 | #数字三角形#
数字三角形
http://www.nowcoder.com/practice/804a22929b844e6b9379a5e90b5e2197
- #include<stdio.h> //菜逼到此一游
- int main(){
-
int a,i,j,k;
-
int s[20]={1,2,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
-
while(scanf("%d",&a)!=EOF){
-
for(i=0;i<a;i++){
-
for(j=0;j<=i;j++){
-
printf("%d ",s[j]);
-
}
-
printf("\n");
-
}
- }
- }