You have a line in main() : if(temp==m) temp+=p; This line is wrong. Change it to if(temp==p) temp+=p; This is because if the present value if itself a prime, we need to print it. answered 27 Apr '15, 09:23

You are not logged in. Please login at www.codechef.com to post your questions!
×CodeChef Discussion 
You have a line in main() : if(temp==m) temp+=p; This line is wrong. Change it to if(temp==p) temp+=p; This is because if the present value if itself a prime, we need to print it. answered 27 Apr '15, 09:23

Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Question tags:
question asked: 26 Apr '15, 20:38
question was seen: 737 times
last updated: 27 Apr '15, 10:11