On submitting the code, it gives wrong ans while the given input gives the right ans. pls check the code https://ide.codingblocks.com/s/93170
Xor profit problem wrong ans
@urvigoel26 hey urvi your code is not giving right ans
1
1000
your code output is 1001
but the right ans is 1023
1 Like
I was approaching the question wrongly. I got it now. Thank you!