Added an efficient implementation for the digit multiplication for
problem 8.