Hello
I am solving this question from hackearth…
My logic is brute force…
First i have calculated all the prime number under n…
Now i have iterated to every index… and for every index i have calculated the all the possible prime array and updated the answer…
But it is showing wrong answer for some test cases…
Please see this…
https://www.hackerearth.com/submission/51480773/
Thanks…