Solutions in C++ and Python3
Code\npython3[]\nclass Solution:\n    def countPairs(self, nums: List[int], target: int) -> int:\n        cnt = 0\n        for i in range(len(nums)):\n         
# Code\n```python3[]\nclass Solution:\n    def countPairs(self, nums: List[int], target: int) -> int:\n        cnt = 0\n        for i in range(len(nums)):\n            for j in range(i + 1, len(nums)):\n                if nums[i] + nums[j] < target:\n                    cnt += 1\n        return cnt\n```\n```c++[]\nclass Solution {\npublic:\n    int countPairs(vector<int>& nums, int target) {\n        int cnt = 0;\n        for (int i = 0; i < nums.size(); i++){\n            for (int j = i + 1; j < nums.size(); j++){\n                if (nums[i] + nums[j] < target){cnt++;}\n            }\n        }\n        return cnt;\n    }\n};\n```
['Python', 'C++', 'Python3']