XOR Profit Problem

what is wrong with my code , I have considered all test cases