1492. The kth Factor of n
https://leetcode.com/problems/the-kth-factor-of-n
Description
Given two positive integers n
and k
.
A factor of an integer n
is defined as an integer i
where n % i == 0
.
Consider a list of all factors of n
sorted in ascending order, return the kth
factor in this list or return -1 if n
has less than k
factors.
Example 1:
Example 2:
Example 3:
Example 4:
Example 5:
Constraints:
1 <= k <= n <= 1000
ac
Previous1491. Average Salary Excluding the Minimum and Maximum SalaryNext1493. Longest Subarray of 1's After Deleting One Element
Last updated