Skip to content

Commit 7be5325

Browse files
committed
3162. Find the Number of Good Pairs I
1 parent 8b43474 commit 7be5325

File tree

1 file changed

+10
-0
lines changed
  • solutions/3162. Find the Number of Good Pairs I

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def number_of_pairs(nums1: list[int], nums2: list[int], k: int) -> int:
2+
pairs = 0
3+
for num1 in nums1:
4+
for num2 in nums2:
5+
if num1 % (num2 * k) == 0:
6+
pairs += 1
7+
return pairs
8+
9+
10+
print(number_of_pairs([1, 3, 4], [1, 3, 4], 1))

0 commit comments

Comments
 (0)