XOR Ki Masti
CodeChefOpen on judge ↗
Hey SLRTCIAN Coders!! As you are all aware about $XOR$ and $AND$ operations of Binary number. So here is a simple task for all of you. Ashish is fond of numbers. He always loves to compare one number with other numbers. Now Ashish have one number $N$ and now he want to find two $Natural$ numbers viz. $A$ and $B$ such that bitwise $xor$ of $A$ and $B$ is $N$ and bitwise $AND$ of $A$ and $B$ is $0$
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start