Can anyone tell me what is wrong in my solution for this DP problem

Problem:- Prime Numbers Again | Practice Problems

This is my submission:- Hackerearth problem -Prime Numbers again - Pastebin.com