The Last Digit
All submissions for this problem are available.
The problem is to find the last digit of the potency of base a and base b. You are given two integer numbers: the base a and the index b, a and b are not 0. The task is to find the last digit of a^b.
the number of test cases.
a and b seperated by space.
For each test case output an integer per line representing the result.
Input: 2 3 2 6 1 Output: 9 6
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH|
Fetching successful submissions
If you are still having problems, see a sample solution here.