input clarification in guessing_game

i am getting wrong answer in guessing_game(seems to be problem with most of the wrong answers).
I want clarification on the input as i seem to be running out of input which proves program wrong(might be that is the challenging part). is input only integer between 1 to N.

Yes you got it right just a correction is that input could be anything between 1 and 10^9.
(Follow the constraints.)
As the problem statement says “output a single line containing probability”,
Probability could be calculated only out of the events that have occurred (here, event=(number from 1 to N) plus (number from 1 to M) should be odd)

Answers you are getting is absolutely in accordance with the one given in the sample output. Please check your code may be there are some other issues such as your program is not able to handle larger inputs properly or is not producing correct no. of possible events. And moreover try not to ask the logic of the program in the forum for ongoing contests.

you mean to say that program should not give output for number greater than 10^9

Actually, chef will not put an input grater than 10^9 while checking your program.
Basically, you have to declare the variables N and M such that they are capable of storing values from 1 up to 10^9. An int type won’t do that right?
If you have to check your code yourself then yes don’t give inputs greater than 10^9.

i have checked all these possiliblities and my code run for 10^9 order input.I checked even some more inputs from very small (as 1 1 ) to very large.something is missing.well shall newline at the end be considered as wrong output?

In many cases, yes. Notice:-

'For each test case, “output a single line” ’

If this does not solve the problem, your code has some serious bug.

still cant see any improvment.think i am stuck . i am giving output in the same format as demanded.just somewhere there deadline for this i can not see any bug myself

1 Like

Deadline as in?
What is your answer for N=M=10^9? I could possibly predict whether there is a problem in your logic or not.

it is 1/2 according to my program

exactly for test case my program produces.
1 1
1 2
2 3

this is what exacly i enter and i get

STOP discussing inputs and outputs during the contest !!!


all i wanted to say given test cases ran fine .only way i think that my program might be wrong can be wrong output i posted input and output

@ramanujan Please read the input and output part of the question once again for clarification.