알고리즘 문제 풀기/BOJ
BOJ 1157 - 단어 공부
bug_maker
2019. 8. 4. 15:26
https://www.acmicpc.net/problem/1157
BOJ 1157 - 단어 공부
작성언어: Python3
xword = input().upper()
counts = [0] * 27
for i in range(0, 26):
counts[i] = word.count(chr(i+65))
mostCount = max(counts)
if counts.count(mostCount) > 1:
print('?')
else:
print(chr(counts.index(mostCount)+65))
pc 환경에서 코드를 보는 것을 권장합니다.