FLIPCOIN..... right for sample test case but giving wrong answer..

http://www.codechef.com/viewsolution/5271503 my solution is giving right answer for all sample test cases and the random inputs i have given but still getting wrong answer on submission…which test case am i missing??
kindly help…