Python (Simple Two Pointers)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def countExcellentPairs(self, nums, k):\n        num_set = set(nums)\n\n        ans = sorted([bin(i)[2:].count("1") for i in num_set])\n\n        i, j, count = 0, len(ans)-1, 0 \n\n        while i < j:\n            if ans[i] + ans[j] >= k:\n                count += 2*(j-i)\n                j -= 1 \n            else:\n                i += 1 \n\n        for i in ans:\n            if 2*i >= k:\n                count += 1 \n\n        return count \n```
['Python3']