Problem: what is the unit digit in the product ( 3 ^ 65 x 6 ^ 59 x 7 ^ 71 ) ?
Rationale: explanation : unit digit in 3 ^ 4 = 1 unit digit in ( 3 ^ 4 ) 16 = 1 unit digit in 3 ^ 65 = unit digit in [ ( 3 ^ 4 ) 16 x 3 ] = ( 1 x 3 ) = 3 unit digit in 6 ^ 59 = 6 unit digit in 7 ^ 4 unit digit in ( 7 ^ 4 ) 17 is 1 . unit digit in 7 ^ 71 = unit digit in [ ( 7 ^ 4 ) 17 x 73 ] = ( 1 x 3 ) = 3 required digit = unit digit in ( 3 x 6 x 3 ) = 4 e
annotated_formula: subtract(multiply(multiply(3, 6), 3), subtract(multiply(multiply(3, 6), 3), const_4))