java ||brute force
//Dev Bhayani\n\nclass Solution {\n    public int countPairs(int[] a, int k) {\n        int n=a.length;\n        int count=0;\n        for(int i=0;i<n;i++)\n   
**//Dev Bhayani**\n\nclass Solution {\n    public int countPairs(int[] a, int k) {\n        int n=a.length;\n        int count=0;\n        for(int i=0;i<n;i++)\n        {\n            for(int j=i+1;j<n;j++)\n            {\n                if(a[i]==a[j] &&(i*j%k==0))\n                {\n                    count++;\n                }\n            }\n        }\n        return count;\n    }\n}
['Array', 'Java']