Skip to content

Commit e6b62d4

Browse files
committed
Time: 48 ms (69.58%), Space: 13.9 MB (62.80%) - LeetHub
1 parent 3a94083 commit e6b62d4

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(object):
2+
def commonFactors(self, a, b):
3+
"""
4+
:type a: int
5+
:type b: int
6+
:rtype: int
7+
"""
8+
x = min(a,b)
9+
count = 0
10+
for i in range(1, x + 1):
11+
if a % i == 0 and b % i == 0:
12+
count += 1
13+
return count

0 commit comments

Comments
 (0)