N=int(input())
oper = []
for i in range(N):
oper.append(input())
index=[]
length = len(oper[0])
check=[1]*length
for i in range(length):
for j in range(N):
if str(oper[0])[i]!=str(oper[j])[i]:
check[i]=0
if 0 in check :
index.append("?")
else:
index.append(str(oper[0])[i])
check=[1]*length
for i in index:
print(i,end="")
입력:
3
abc.txt
abc.gif
abc.aaa
출력:
abc.???
'자기개발👨💻 > 코딩 알고리즘' 카테고리의 다른 글
[Python] 백준 1978 소수 찾기 (0) | 2021.06.20 |
---|---|
[Python] 백준 4673 셀프넘버 (환기_성공) (0) | 2021.06.20 |
[python] 백준1145 적어도 대부분의 배수 (0) | 2021.03.11 |
[python] 프로그래머스 2019kakao 오픈채팅방 (0) | 2021.02.21 |
[python] 프로그래머스 2019kakao 실패율 (0) | 2021.02.21 |
[python] 백준 10814 나이순 정렬 (0) | 2021.01.31 |