Prime Sum
CodeChefOpen on judge ↗
Chef has developed interest in prime numbers and is looking out for a challenge to showcase his skills. He picks a random number $N$, then finds $N$ prime numbers beginning from $2$. For example, if $N=5$, then the list of prime numbers will be $2, 3, 5, 7, 11$. Given the value of $N$, you have to find the sum of those $N$ prime numbers. Just to brush-up your memory, a prime number is a 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.
Sign in to chat with the tutor and save your progress.
Sign in to start