Can't understand where my code fails

I have checked many times my code on my system but can’t understand where the problem is?

Question is:
https://online.codingblocks.com/app/player/39938/content/57023/5088/code-challenge

And my solution:

@Sparda947 could you tell me how you are handling big numbers since we can’t store them in array.

two arrays are been made namely as prime and res

in res array i am solving for big numbers

@Sparda947 there comes a segmented sieve approach which solves this type of problem.look at this code it works fine, it is using segmented sieve (https://ide.codingblocks.com/s/187733)

Yes I was trying the same way but I was also trying to implement my code such that they can find all the solutions from (1 to 10^10) numbers using prime seive in iteration… It did gave me successfull result in one of the test cases but failed in other… Thanks for your support I will make changes and implement default prime sevie

okay implement it and let me know if you faces any further problems.