Fastest Approach - Java
Code\n\nclass Solution{\n    public int countPairs(List<Integer> nums, int t){\n        int s = 0;\n        for(int i=0; i<nums.size()-1; i++){\n            for
# Code\n```\nclass Solution{\n    public int countPairs(List<Integer> nums, int t){\n        int s = 0;\n        for(int i=0; i<nums.size()-1; i++){\n            for(int j=i+1; j<nums.size(); j++){\n                if(nums.get(i)+nums.get(j)<t) s++;\n            }\n        }\n        return s;\n    }\n}\n```
['Java']