Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for _ in range(int(input())):
- Test=input().split()
- if Test[0].isdigit() and Test[1].isdigit():
- print(int(Test[0])+int(Test[1]))
- elif Test[0].isdigit() or Test[1].isdigit():
- if Test[0].isdigit():
- numb=int(Test[0])
- print(Test[1][numb-1])
- else:
- numb=int(Test[1])
- print(Test[0][numb-1])
- else:
- print(Test[0]+Test[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement