#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목제 코드 맞는 지 확인해주세요2024-05-01 14:32
작성자

예시 입력값 넣었을 때는 전부다 실행되는데 답 제출하니깐 틀렸다고 뜹니다,,

첫번째가 틀렸다고 뜨고 두번째는 맞았다고 떠요

word=input().lower()
new=list(set(word))
countlist=[]
for x in new:
time=word.count(x)
countlist.append(time)
if countlist.count(max(countlist))>=2:
print('?')
else:
print(new[countlist.index(max(countlist))].upper())



스크린샷 2024-05-01 오후 2.28.06.png
 

word=input().lower()
new=list(set(word))
countlist=[]
for x in new:
time=word.count(x)
countlist.append(time)
if countlist.count(max(countlist))>=2:
print('?')
else:
print(new[countlist.index(max(countlist))].upper())
댓글