first commit

from old repository to a new repository
This commit is contained in:
Gyubin Han
2024-04-30 16:59:10 +09:00
commit 2600340c03
93 changed files with 1610 additions and 0 deletions

18
boj/1032.py Normal file
View File

@@ -0,0 +1,18 @@
from sys import stdin
n=int(stdin.readline().rstrip())
pattern=""
plen=0
for _ in range(n):
name=stdin.readline().rstrip()
if plen==0:
pattern=name
plen=len(pattern)
else:
for i in range(plen):
if pattern[i]=='?' or pattern[i]==name[i]:
continue
else:
pattern=pattern[:i]+'?'+pattern[i+1:]
print(pattern)