Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('19.txt')
- texts = file.readlines()
- Max = 0
- Min = 10000000000000
- d = dict()
- for text in texts:
- Max = max(Max, text.count('Q'))
- for c in text:
- if c in d:
- d[c] += 1
- Min = min(Min, d[c])
- else:
- d[c] = 1
- ans = []
- for c in d:
- if d[c] == Min:
- ans.append(c)
- ans.sort()
- print(Max, Min[-1])
Advertisement
Add Comment
Please, Sign In to add comment