Code passing test cases but giving WA

I was solving CHEFSTEP
My code passed the test case but it is giving WA.

Can someone please help me?

Consider the test input:

2
5 3
12 13 18 20 27216
5 3
12 13 18 20 27216

Edit: There seems to be an important point missing from the “Output:” section of the Problem Statement.

3 Likes

Thanks a lot ! I forgot to input a new line so that the next output comes in a new line.

1 Like

To be fair, the Problem Statement doesn’t ask you to do that, though it should :slight_smile:

3 Likes