Submit | All submissions | Best solutions | Back to list |
TESTXOR - Test Xor |
Xor is a binary operation which deal with ones and zeroes.
- 1 xor 1 is 0
- 0 xor 0 is 0 too
but
- 1 xor 0 is 1
- 0 xor 1 is 1
So we say that xor gives 1 when the arguments are different.
You will read two arguments (1 or 0 each) separated by space, print their xor result.
Input
a b (separated by space)
0 <= a, b <= 1
Output
The result of a xor b.
(Don't print end of line character, just print the result.)
Example
Input: 1 1 Output: 0
Added by: | Mostafa 36a2 |
Date: | 2013-12-30 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Thank you SPOJ |