Skip to content

Commit

Permalink
Add kattis prob recount in Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
iandioch committed Sep 13, 2017
1 parent f15d682 commit c8f2d45
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kattis/recount/solution.py
@@ -0,0 +1,15 @@
d = {'duine eigin': -10}
while True:
s = input()
if s == '***':
break
if s in d:
d[s] += 1
else:
d[s] = 1

v = sorted(d, key=lambda x:d[x])
if d[v[-1]] == d[v[-2]]:
print('Runoff!')
else:
print(v[-1])

0 comments on commit c8f2d45

Please sign in to comment.