[백준1157_파이썬(python)] - 단어 공부

경이·2021년 7월 2일
0
post-thumbnail

🔴 문제

단어 공부


🟡 Sol

S = input().lower()
S_list = list(set(S))
cnt = []


for i in S_list:
    count = S.count(i)
    cnt.append(count)

if cnt.count(max(cnt))>=2:
    print('?')
else:
    print(S_list[cnt.index(max(cnt))].upper())

🟢 풀이

까다로운 문제라서 다른사람의 풀이를 참고했다.


🔵 Ref

https://wook-2124.tistory.com/257

profile
이사중입니다!🌟https://velog.io/@devkyoung2

0개의 댓글

관련 채용 정보