plz tell why i am getting wrong answer ??i am getting right answer on my compiler as well as on ideone
Hey buddy , when you ask a question do give a link to your code and mention the problem you are talking about .
Anyway I saw your submissions and since there was only one submission , I didn’t have difficulty about figuring what you are talking about .
So buddy , who told you to check that the number is greater than 0 before printing .
You have to print all numbers positive or negative and stop when you get 42 .
Welcome to CodeChef .
Have a nice time at CodeChef .
Actually he tried to solve just one problem - TEST, but I agree, that if someone is asking for help, he/she should do so, that the one who want to help, has it as easy as possible.
- proper linking (problemstatement and also problematic submission)
- proper algorithm description in non trivial problems
@rksaurabh123 it seems to me, that you are assuming, that number is nonnegative, that’s incorrect and unfortunatelly I’m doing this kind of mistakes a lot