← All problemsSign in

Largest Divisor

Sam is learning to find divisors of a number. Sam likes big numbers so he is interested to find the $K^{th}$ largest divisor of a number. But the task seems very simple so he is not happy. His friends gave him $N$ numbers and asked him to find the $K^{th}$ largest number which divides all of them. He wants you to help him to solve this tedious task. ### Input - First line will contain $T$, number

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start