The Ultra Fast Mathematician problem given in bitmasking section but the editorial is in string approach

The Ultra Fast Mathematician problem given in bitmasking section but the editorial is in string approach can i get the editorial with bit masking ans the output format is written as we should not omit the leading zeros but when i unlocked the editorial the output where in leading zero.
Here is my solution https://ideone.com/NmV4QA with bit masking but cant able to add leading zero

Can i get a solution with bit masking

Hello @Axelblaze1005 in this question we have to just perform the xor of the bits which says if the bits are same then the output should be low whereas if the bits are different then the result will be high(i.e 1) so as we are already given with the bits so thats why we are taking the bits in the string format and then just checking of they are same or different…
wait i have checed your code and you are also taking the if condition for the xor of the bits.
looking for error in your code.
please wait.

@Axelblaze1005 can you please explain this line:
ans = ans|(1<<j);?

setting the jth bit as 1

Hey @Axelblaze1005 you cant do this question with the help of the bits,you have to do this with the string because the cinstraints are high.
even if you are using long long int then you cant take the work on the number with digits more than 18.
and here the maximum number of digits can be 100.

i am asking ans = ans|(1<<j);?
what is this | in the line.
i think this is wrong syntax.

| is using for or like we used ^ for xor

okh thanks for helping

or symbol is used with this ‘||’.

@Axelblaze1005 if you feel that your doubt is cleared you can mark this as resolved.

i am not checking the condition i am setting the bit with or like this

ohh okay okay.do you have anyother doubt?
or is your doubt cleared?

no other doubts thanks for helping

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.