find the ones digit of 73 ^ 351
import math
n0 = 73.0
n1 = 351.0
t0 = 3.0 + 4.0
t1 = n1 / 4.0
t2 = 10.0 * 2.0
t3 = math.floor(t1)
t4 = t0 * 10.0
t5 = t3 * 4.0
t6 = n0 - t4
t7 = n1 - t5
t8 = t6**min(t7, 5)
answer = t8 - t2
print(answer)