Created
June 19, 2020 15:57
-
-
Save pknowledge/d8f8dfa2ad752a1f48d9cfbc0cebcc8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bitwise operator and - & | |
# bitwise operator or - | | |
# bitwise operator not - ~ | |
# bitwise operator xor - ^ | |
# bitwise operator right shift - >> | |
# bitwise operator left shift << | |
# rightshift is divide in power of 2 | |
# leftshift is multiply in power of 2 | |
def evenodd(n): | |
if n&1 == 1: | |
print("odd") | |
else: | |
print("even") | |
def mulpow2(x,y): | |
return x << y | |
def divpow2(x,y): | |
return x >> y | |
t = int(input()) | |
while t: | |
x,y = map(int,input().split()) | |
#evenodd(n) | |
print(mulpow2(x,y)) | |
print(divpow2(x,y)) | |
t=t-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment