반응형
https://www.acmicpc.net/problem/1157
# @Author YoungMinKim
# baekjoon
string = input()
ls= list(string)
ls = [ls[i].lower() for i in range(len(ls))]
maximum=0
cnt=[]
final=''
for i in set(ls):
cnt.append(ls.count(i))
if maximum < ls.count(i):
maximum = ls.count(i)
final = i
else:
continue
if cnt.count(maximum)>1:
print('?')
else:
print(final.upper())
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 1237 (0) | 2020.08.21 |
---|---|
baekjoon - python - 1212 (0) | 2020.08.21 |
baekjoon - python - 1152 (0) | 2020.08.21 |
baekjoon - python - 1110 (0) | 2020.08.21 |
baekjoon - python - 1026 (0) | 2020.08.21 |
댓글