测试点信息
测试点编号 | 状态 |
---|---|
#1−#5 | WA |
源代码 |
#include"stdio.h"
#include"math.h"
void draw(int depth,int space_num,int repeat){
if(depth==1){
for(int i=0;i<repeat;i++){
for(int j=0;j<space_num;j++)
printf(" ");
printf(" /\\ ");
for(int j=0;j<space_num;j++)
printf(" ");
}
printf("\n");
for(int i=0;i<repeat;i++){
for(int j=0;j<space_num;j++)
printf(" ");
printf("/__\\");
for(int j=0;j<space_num;j++)
printf(" ");
}
printf("\n");
}else{
draw(depth-1,space_num+pow(2,depth-1),repeat);
draw(depth-1,space_num,repeat*2);
}
}
int main(void){
int n;
scanf("%d",&n);
draw(n,0,1);
return 0;
}