Java Solution || Brute Force || Easy Understandable
\tclass Solution {\n\t\tpublic int countPairs(int[] nums, int k) {\n\t\t\tint count =0;     \n\t\t\tfor(int i = 0; i < nums.length; i++)\n\t\t\t{\n\t\t\t\tfor(i
\tclass Solution {\n\t\tpublic int countPairs(int[] nums, int k) {\n\t\t\tint count =0;     \n\t\t\tfor(int i = 0; i < nums.length; i++)\n\t\t\t{\n\t\t\t\tfor(int j = nums.length-1; j > i;j--)\n\t\t\t\t{\n\t\t\t\t\tif(nums[i] == nums[j] && (i * j) % k == 0)\n\t\t\t\t\t{\n\t\t\t\t\t count++;   \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}   \n\t\t\treturn count;\n\t\t}\n\t}
['Array', 'Java']