티스토리 뷰
small = 'abcdefghijklmnopqrstuvwxyz'
big = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
num = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
word = input()
for i in range(len(word)):
for j in range(len(small)):
if word[i] == small[j]:
num[j] += 1
if word[i] == big[j]:
num[j] += 1
Max = 0
x = 0
for l in range(len(num)):
if num[l] > Max:
Max = num[l]
find = big[l]
x = Max
count = 0
for m in range(len(num)):
if Max == num[m]:
count += 1
if count >= 2:
find = '?'
break
print(find)
반응형
'알고리즘' 카테고리의 다른 글
백준 알고리즘 2581번 자바 (0) | 2020.03.29 |
---|---|
백준 알고리즘 1316번 파이썬 (0) | 2019.11.02 |
백준 알고리즘 5622번 파이썬 (0) | 2019.11.02 |
백준 알고리즘 2908번 파이썬 (0) | 2019.11.02 |
백준 알고리즘 1152번 파이썬 (0) | 2019.11.02 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 이분탐색
- palera1n
- SWiFT
- main branch
- Widget
- 백준 1065번 swift
- 애플 인증서
- 클로저
- provisioning key
- Xcode
- 파이썬
- readme ignore파일 포함한 repository
- sileo
- django
- New Group
- 장고
- 알고리즘
- xcsharedata
- ios
- mvvm in swiftui
- 백준 4673 swift
- 백준
- xcuserdata
- 백준알고리즘
- New Group Without Folder
- closure
- property wrapper
- ios mvvm
- 프로퍼티 래퍼
- 애플 인증
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
글 보관함