Simple Java Solution Beats 100%
Code
# Code
```java []
class Solution {
    public int numberOfPairs(int[] nums1, int[] nums2, int k) {
        int res = 0;

        for(int i = 0; i<nums1.length; i++)
        {
            int out= nums1[i];

            for(int j =0; j<nums2.length; j++)
            {
                int inn = nums2[j];

                if(out % (inn*k) == 0)
                {
                    res++;
                }
            }
        }   
        return res;
    }
}
```

![LC.png](https://assets.leetcode.com/users/images/e28b0048-9317-4d65-b55e-303a1caf8867_1740410915.1752717.png)

['Java']