반응형
백준알고리즘 1157번: 단어 공부
알고리즘(Python,Java)2019. 7. 10. 19:09백준알고리즘 1157번: 단어 공부

백준알고리즘 1157번: 단어 공부 문제 알파벳 대소문자로 된 단어가 주어지면, 이 단어에서 가장 많이 사용된 알파벳이 무엇인지 알아내는 프로그램을 작성하시오. 단, 대문자와 소문자를 구분하지 않는다. 사용언어 : python3 from string import ascii_lowercase lower_case = list(ascii_lowercase) input1 = input().lower() array1 = [] for i in range(len(lower_case)): array1.append(input1.count(lower_case[i])) if array1.count(max(array1)) >1: print('?') else: print(lower_case[array1.index(max(arr..

반응형
image