You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
n, value = map(int, input().split()) points = list(map(int, input().split())) distances = [x + value for x in points] ans = len(set(points) & set(distances)) print(ans)
Feel free to ask if you have any questions :)
Seems like cookies are disabled on this browser, please enable them to open this website
Pairs
You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
Feel free to ask if you have any questions :)