반응형
x, y = map(int, input().split())
arr = []
check = False
answer = []
for i in range(x):
arr.append(input())
'''
STORR
STARE
STORE
SCORE
STONE
'''
for i in arr:
if check:
break
for j in arr:
if check:
break
count = 0
for k in range(y):
if i == j:
break
if count == 3:
check = True
break
if i[k:k + 1] != j[k:k + 1]:
count = count + 1
else:
if y != answer and i != j:
answer.append(i[k:k + 1])
if check:
print('CALL FRIEND')
else:
print(answer)
마지막 부분이 풀리지 않음...
반응형
'IT' 카테고리의 다른 글
파이썬 기초 1 (1) | 2023.09.06 |
---|---|
spring security in action chap.13 (1) | 2023.09.04 |
스프링시큐리티인액션 12장. oauth2 (0) | 2023.09.02 |
spring security in action chapter 11 (0) | 2023.08.25 |
백준 파이썬 10845 큐 (0) | 2023.08.22 |