페이지

1032번: 명령 프롬프트

https://www.acmicpc.net/problem/1032


$O(nl)$


#include<cstdio>
int n;
char s[51], c;
int main() {
    scanf("%d %s", &n, s);
    for (int i = 1; i < n; i++) for (int j = 0; s[j]; j++) scanf(" %c", &c), s[j] = s[j] - c ? '?' : c;
    printf("%s", s);
    return 0;
}

댓글 없음 :

댓글 쓰기