Kth largest factor of number N
Given two positive integers N and K, the task is to print the Kth largest factor of N. Input: N = 12, K = 3Output: 4Explanation: The factors of 12 are {1, 2, 3, 4, 6, 12}. The largest factor is 12 and the 3rd largest factor is 4. Input: N = 30, K = 2Output: 15Explanation: The factors of 30 are {1, 2