Skip to content

Commit c955567

Browse files
committed
Time: 93 ms (95.28%) | Memory: 16.6 MB (10.24%) - LeetSync
1 parent 5f05381 commit c955567

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Solution:
2+
def closestDivisors(self, num: int) -> List[int]:
3+
for i in reversed(range(1, int((num + 2) ** 0.5) + 1)):
4+
if not (num + 1) % i:
5+
return [i, (num + 1) // i]
6+
if not (num + 2) % i:
7+
return [i, (num + 2) // i]

0 commit comments

Comments
 (0)