Can anyone help me for this problem?[link](http://www.spoj.com/problems/NTHPRIME/) is here.↵
[I get it from there](https://codeforces.net/blog/entry/55274?fbclid=IwAR1r6gq7H5J29QfXcpg0Jh9YZBn4Zwd8GKy5D9kLpof-nFRrDCbvBsUD-48)
[I get it from there](https://codeforces.net/blog/entry/55274?fbclid=IwAR1r6gq7H5J29QfXcpg0Jh9YZBn4Zwd8GKy5D9kLpof-nFRrDCbvBsUD-48)