Update cachematrix.R

Added solution.