티스토리 뷰
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
- SWiFT
- sileo
- xcsharedata
- mvvm in swiftui
- 애플 인증서
- property wrapper
- 파이썬
- main branch
- 애플 인증
- django
- closure
- ios
- Widget
- New Group Without Folder
- ios mvvm
- New Group
- 백준
- 이분탐색
- 백준 1065번 swift
- provisioning key
- Xcode
- 알고리즘
- 백준 4673 swift
- readme ignore파일 포함한 repository
- 프로퍼티 래퍼
- 백준알고리즘
- 장고
- palera1n
- 클로저
- xcuserdata
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함