Can someone please explain this problem to me, the problem statement isn’t very clear and I can’t understand the problem at all.

Problem statement :https://www.codechef.com/JUNE19B/problems/CHFING

Thanks in advance.

Can someone please explain this problem to me, the problem statement isn’t very clear and I can’t understand the problem at all.

Problem statement :https://www.codechef.com/JUNE19B/problems/CHFING

Thanks in advance.

Let’s take the given Testcases:

2 1 -> (1, 2) from these numbers you can from all the other numbers ie 1+2=3,2+2=4,5,6…

so answer is 0.

3 3 -> (3,4,5) you can form: 3+3=6,3+4=7,8,9… but not 1 and 2.

so answer is 2 (you can’t form 1 and 2).

1 Like

Bro there is no requirement to explain all these ,

2 Likes

Thanks bro, Understood it now.

Thank you very much.

1 Like

He didn’t give me any hint bro, just explained the statement to me.

I don’t think there’s anything wrong in that.

No , I think there is no requirement to explain such in detail, but okay , u understand , now compete your question.

Yeah, I will try my best

I am getting WA in second set of test cases in second sub task of this problem. Someone please point out any possible error I might have made.

Keep patience , editorial comes in a day

1 Like

Don’t worry, your logic is perfect the only thing you have to do is something to prevent overflow at large values of n and k. I too faced this for 2 days and then i got success.

2 Likes