Bitwise XOR

Bitwise XOR

Easy Python Operators 19 views
Explanation Complexity

Problem Statement

Read two non-negative integers a and b. Output a ^ b.

Input Format

One line: a b.

Output Format

One integer.

Example

6 10
12

Constraints

0

Input / Output Format

Input Format
One line: a b.
Output Format
One integer.
Constraints
0

Examples

Input:
6 10
Output:
12

Example Solution (Public)

Python
import sys
p=sys.stdin.read().strip().split()
if len(p)<2: sys.exit(0)
a=int(p[0]); b=int(p[1])
sys.stdout.write(str(a ^ b))

Official Solution Code

import sys
p=sys.stdin.read().strip().split()
if len(p)<2: sys.exit(0)
a=int(p[0]); b=int(p[1])
sys.stdout.write(str(a ^ b))
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.