All test cases not passed

hey @lakshit you need to use seive of eranthoses, in order to solve this question, the current approach is too inefficient.