Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://olimpiada.ic.unicamp.br/static/extras/obi2019/provas/ProvaOBI2019_f3pj.pdf
- N,I,F = [int(i) for i in input().split()]
- V = [int(i) for i in input().split()]
- quant = 0
- V = sorted(V)
- for a in range(N):
- for b in range(a+1,N):
- if (V[a]+V[b]) >= I and (V[a]+V[b]) <= F:
- quant += 1
- print(quant)
Advertisement
Add Comment
Please, Sign In to add comment