A = 2 B = 10Input 2:
A = 11 B = 11
210 = 1024, hence last digit is 4.Explanation 2:
1111 = 285311670611, hence last digit is 1.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.