XOR profit problem

https://ide.codingblocks.com/s/656547 Kindly check this code and tell what possible things I can do to solve this problem as I am not getting what else I can do.

@sb1251224_6919c19fccd96630,
check this https://ide.codingblocks.com/s/656553
just use 2 for loops since nos can be upto 1000 o(n2) is good to pass all test cases here

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.