반응형

Prob


Approach

upper() : 대문자로

 


Code

q = input()
q = q.upper()
q = list(q)
cnt = [0] * 26
for i in range(ord('Z') - ord('A') + 1):
    cnt[i] = q.count(chr(ord('A') + i))

if cnt.count(max(cnt)) > 1:
    print("?")
else : 
    print(chr(ord('A') + cnt.index(max(cnt))))

 

출처

https://www.acmicpc.net/problem/1157

반응형
블로그 이미지

Refrin

일상생활 끄적 IT 프로젝트 끄적