T prime problem


sir it is giving tle and wrong answer. please check