In this problem,I have come up with a solution that is only equal bit length numbers meet the condition of & operation >= XOR operation. That means number 2-3,4-7,8-15.... meet the conditions given in this problem.
Based on this idea, I write a solution, But this is giving always wrong answer. I am so frustrated and don't have a clue what is missing.
Can anybody please help me,what is wrong with my approach?
Have you tried the following:
98% of WAs and REs can be resolved this way. People here don't have the time to delve into every code posted here, it's much harder to debug somebody else's code and being able to debug your own code is a valuable skill. It is also a very routine process that can be learned much faster than problem solving and algorithms.
ans overflows