← All problemsSign in

Chef and prime numbers

Chef recently learned about prime numbers and found them to be very fascinating. In fact he was so fascinated by them that he started making a list of the first few prime numbers. Can you help him by finding the prime number at the $k^{th}$ position? So if the first few prime numbers are listed as $2, 3, 5, 7, 11 ...$, the $3^{rd}$ prime number will be $5$. ###Input: - First line will contain $T

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