Skip to content

Commit f967067

Browse files
authored
Create Find the Number of Good Pairs I.java
1 parent 447d746 commit f967067

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Solution {
2+
public int numberOfPairs(int[] nums1, int[] nums2, int k) {
3+
int count = 0;
4+
for (int i = 0; i < nums1.length; i++) {
5+
for (int j = 0; j < nums2.length; j++) {
6+
if (nums1[i] % (nums2[j] * k) == 0) {
7+
count++;
8+
}
9+
}
10+
}
11+
return count;
12+
}
13+
}

0 commit comments

Comments
 (0)