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