← All problemsSign in

Captain Marvel meets Avengers

Captain Marvel is here, and going toe-to-toe with Thor without blinking. They devise a plan to travel in past at specific events in the timeline and collect the stones to beat Thanos. They know that there are total $N$ events which occured before the decimation. Each event is numbered from 1 to $N$. And they have to travel only in the events which are prime. ( i.e. 2, 3, 5, etc. ) This

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