1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #include <stdio.h> #include <string.h> #define true 1 #define false 0 int main() { int N; char array[51][51]; int len; int check = true; scanf(“%d”, &N); for (int i = 0; i < N; i++) { scanf(“%s”, array[i]); } len = strlen(array[0]); if (N == 1) { printf(“%s”, array[0]); } else { for (int i = 0; i < len; i++) { check = true; for (int j = 0; j < N; j++) { if (array[j][i] != array[0][i]) check = false; } if (check == false) { array[0][i] = ‘?’; } } printf(“%s”, array[0]); } return 0; } | cs |