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

28
boj/1157.py Normal file
View File

@@ -0,0 +1,28 @@
import sys
s=sys.stdin.readline().rstrip().upper()
cnt=dict()
for i in range(len(s)):
if not s[i] in cnt:
cnt[s[i]]=0
cnt[s[i]]+=1
# print(s[i],cnt[s[i]])
max=[0,'A',False]
for i in range(ord('A'),ord('a')):
k=chr(i)
if not k in cnt:
continue
else:
# print(cnt[k])
if max[0]<cnt[k]:
max[0]=cnt[k]
max[1]=k
max[2]=False
elif max[0]==cnt[k]:
max[2]=True
if max[2]==True:
print("?")
else:
print(max[1])