Correct Answer on my home computer, but wrong in the codechef judge

help
challenge
codechef
ide
submissions
wa

#1

Hello.

I am new to this platform, and I am participating in July Challenge 2018 (my first competition here) I tried submitting a solution to the first problem, but the judge gives wrong answer (WA) as its verdict. I compile the same in my home computer and it works perfectly fine there. I know, I am not supposed to post the solutions to ongoing challenges here, but what where am I going wrong?


#2

General advice to new programmers at codechef :
print the answer in exact same format as asked in question… (Don’t print please enter this and that)
Please check for corner cases and try testing your logic for different random inputs and think about missing corner case in your soln…
Can’t help more as it is a live contest… ping me after contest if u still have any query…


#3

is it regarding the magic set question because the question is not explained well and the test case is explained for n=2 i asked in the comment section of the question to explain a test case with n=5 so that we can understand the question properly still no reply yet


#4

ahh solved it finally the test case should be explained in detail


#5

Probably you have not made initialisation for some variables, and your compiler initialises them to zero but then Codechef judge doesn’t.


#6

Full test data is not revealed. Your solution runs for critical inputs for which it is/might be giving wrong output. Also, superflous print statements give wrong answer, as its a machine checking for an exact match between whats asked and what you print.


#7

They will probably reply in once in a day…