# Task

Elections are in progress!

Given an array of numbers representing votes given to each of the candidates, and an integer which is equal to the number of voters who haven't cast their vote yet, find the number of candidates who still have a chance to win the election.

The winner of the election must secure strictly more votes than any other candidate. If two or more candidates receive the same (maximum) number of votes, assume there is no winner at all.

**Note**: big arrays will be tested.

# Examples

```
votes = [2, 3, 5, 2]
voters = 3

result = 2
```

* Candidate `#3` may win, because he's already leading.
* Candidate `#2` may win, because with 3 additional votes he may become the new leader.
* Candidates `#1` and `#4` have no chance, because in the best case scenario each of them can only tie with the candidate `#3`.

___

```
votes = [3, 1, 1, 3, 1]
voters = 2

result = 2
```

* Candidate `#1` and `#4` can become leaders if any of them gets the votes.
* If any other candidate gets the votes, they will get tied with candidates `#1` and `#4`.

___

```
votes = [1, 3, 3, 1, 1]
voters = 0

result = 0
```

* There're no additional votes to cast, and there's already a tie.

Difficulty: introductory

Starter code:

def elections_winners(votes, k):
	

Solutions:
def elections_winners(votes, k):
    m = max(votes)
    return sum(x + k > m for x in votes) or votes.count(m) == 1

def elections_winners(votes, k):
  best = max(votes)
  if k == 0 and votes.count(best) == 1:
      return 1
  return len([x for x in votes if x + k > best])

def elections_winners(votes, k):
    m = max(votes)
    return [0, 1][votes.count(m) == 1] if not k else sum(i + k > m for i in votes) 

def elections_winners(a, n):
    m = max(a)
    return sum(x + n > m for x in a) if n else a.count(m) == 1

def elections_winners(votes, k):
    max_so_far = max(votes)
    lst = [vote for vote in votes if vote + k > max_so_far]
    return len(lst) if lst else bool(votes.count(max_so_far) == 1)

def elections_winners(votes, k):
    limit = max(votes)
    return sum(1 for vote in votes if (vote + k) > limit) + (votes.count(limit) == 1) * (k == 0)


elections_winners=lambda v,k:v.sort()or sum(e+k>v[-1]for e in v)or v.count(v[-1])==1

def elections_winners(votes, k):
  #coding and coding..
    win = max(votes)
    return sum(i + k > win for i in votes) or votes.count(win) == 1

elections_winners=lambda v,k: (lambda m: (lambda c: 0 if c!=1 else c)(v.count(m)) if not k else len([p for p in v if p>m-k]))(max(v))

def elections_winners(a,k):
    m = max(a)
    v = [i+k for i in a if i+k>m]
    if k == 0 and not v and a.count(m)==1: return 1
    return len(v)