Tap here to switch tabs
Problem
Submissions

Problem: The kth Factor of n

med
30 min
Try to solve the The kth Factor of n problem.

Statement

Given two positive integers, n and k, a factor of n is any positive integer i such that n % i == 0.

Construct a list of all factors of n in ascending order and return the kthkth factor in this list. If n has fewer than k factors, return 1-1.

Constraints:

  • 11 \leq k \leq n 103\leq 10^3

Unlock AI-Powered LearningUpgrade to smarter learning with instant explanations of Ask Agent, Personalized Interview Prep, Real-World Projects, 3 AI Mock Interviews per month, and Personalized Paths
Tap here to switch tabs
Problem
Submissions

Problem: The kth Factor of n

med
30 min
Try to solve the The kth Factor of n problem.

Statement

Given two positive integers, n and k, a factor of n is any positive integer i such that n % i == 0.

Construct a list of all factors of n in ascending order and return the kthkth factor in this list. If n has fewer than k factors, return 1-1.

Constraints:

  • 11 \leq k \leq n 103\leq 10^3

Unlock AI-Powered LearningUpgrade to smarter learning with instant explanations of Ask Agent, Personalized Interview Prep, Real-World Projects, 3 AI Mock Interviews per month, and Personalized Paths