You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
709 B

#include <bits/stdc++.h>
using namespace std;
char a[5][40] =
{"XXX...X.XXX.XXX.X.X.XXX.XXX.XXX.XXX.XXX",
"X.X...X...X...X.X.X.X...X.....X.X.X.X.X",
"X.X...X.XXX.XXX.XXX.XXX.XXX...X.XXX.XXX",
"X.X...X.X.....X...X...X.X.X...X.X.X...X",
"XXX...X.XXX.XXX...X.XXX.XXX...X.XXX.XXX"};
char s[110];
int main() {
int n;
scanf("%d %s", &n, &s);
for (int i = 0; i <= 4; i++) { // 5行
for (int j = 0; j < strlen(s); j++) {
int c = s[j] - '0';
for (int k = 0; k < 3; k++)
printf("%c", a[i][4 * c + k]);
if (j < strlen(s) - 1) printf(".");
}
printf("\n");
}
return 0;
}