4 ms·Units Digit of a Power: A Constant-Time Algorithm Using a Little Number Theory3 points by emboss 14y ago