Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://inf-ege.sdamgia.ru/problem?id=33494
- s = open('24 (1).txt').readline()
- cnt = {}
- for i in range(1, len(s)):
- if s[i - 1] == 'E':
- if s[i] not in cnt:
- cnt[s[i]] = 0
- cnt[s[i]] += 1
- answ = (0, 'q')
- for e in cnt:
- answ = max(answ, (cnt[e], e))
- print(answ[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement