http://162.105.81.212/JudgeOnline/problem?id=1102 超级囧的模拟题..Orz #include<iostream> using namespace std; int main() { //freopen("in.txt", "r", stdin); //freopen("out.txt", "w", stdout); char ans[10][5][5]; strcpy(ans[0][0]," - "); strcpy(ans[0][1],"| |"); strcpy(ans[0][2]," "); strcpy(ans[0][3],"| |"); strcpy(ans[0][4]," - "); strcpy(ans[1][0]," "); strcpy(ans[1][1]," |"); strcpy(ans[1][2]," "); strcpy(ans[1][3]," |"); strcpy(ans[1][4]," "); strcpy(ans[2][0]," - "); strcpy(ans[2][1]," |"); strcpy(ans[2][2]," - "); strcpy(ans[2][3],"| "); strcpy(ans[2][4]," - "); strcpy(ans[3][0]," - "); strcpy(ans[3][1]," |"); strcpy(ans[3][2]," - "); strcpy(ans[3][3]," |"); strcpy(ans[3][4]," - "); strcpy(ans[4][0]," "); strcpy(ans[4][1],"| |"); strcpy(ans[4][2]," - "); strcpy(ans[4][3]," |"); strcpy(ans[4][4]," "); strcpy(ans[5][0]," - "); strcpy(ans[5][1],"| "); strcpy(ans[5][2]," - "); strcpy(ans[5][3]," |"); strcpy(ans[5][4]," - "); strcpy(ans[6][0]," - "); strcpy(ans[6][1],"| "); strcpy(ans[6][2]," - "); strcpy(ans[6][3],"| |"); strcpy(ans[6][4]," - "); strcpy(ans[7][0]," - "); strcpy(ans[7][1]," |"); strcpy(ans[7][2]," "); strcpy(ans[7][3]," |"); strcpy(ans[7][4]," "); strcpy(ans[8][0]," - "); strcpy(ans[8][1],"| |"); strcpy(ans[8][2]," - "); strcpy(ans[8][3],"| |"); strcpy(ans[8][4]," - "); strcpy(ans[9][0]," - "); strcpy(ans[9][1],"| |"); strcpy(ans[9][2]," - "); strcpy(ans[9][3]," |"); strcpy(ans[9][4]," - "); int s, id, len, i, j, k; char c[10]; while(scanf("%d%s", &s, &c) && s) { len = strlen(c); for(i=0; i<len; i++) { id = c[i] - '0'; printf(" "); for(j=0; j<s; j++) printf("%c", ans[id][0][1]); printf(" "); if(i != len-1) printf(" "); } printf("/n"); for(i=0; i<s; i++) { for(k=0; k<len; k++) { id = c[k] - '0'; printf("%c", ans[id][1][0]); for(j=0; j<s; j++) printf(" "); if(k == len-1) printf("%c/n", ans[id][1][2]); else printf("%c ", ans[id][1][2]); } } for(i=0; i<len; i++) { id = c[i] - '0'; printf(" "); for(j=0; j<s; j++) printf("%c", ans[id][2][1]); printf(" "); if(i != len-1) printf(" "); } printf("/n"); for(i=0; i<s; i++) { for(k=0; k<len; k++) { id = c[k] - '0'; printf("%c", ans[id][3][0]); for(j=0; j<s; j++) printf(" "); if(k == len-1) printf("%c/n", ans[id][3][2]); else printf("%c ", ans[id][3][2]); } } for(i=0; i<len; i++) { id = c[i] - '0'; printf(" "); for(j=0; j<s; j++) printf("%c", ans[id][4][1]); printf(" "); if(i != len-1) printf(" "); } printf("/n/n"); } return 0; }