I am pretty stuck with the factorial part. This topic has two parts (please bear with me) - confirmation of my method in solving a factorial and question from prep swift
Part 1 - confirmation of technique in solving a factorial
Sample question: solve a factorial of 8!
8! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8
Step 1: I would just pair first and last digit for ease of pairing solution
(1 x 8) x (2 x 7) x (3 x 6) x (4 x 5) = 8 x 14 x 18 x 20
Step 2: use calculator to solve it leading to 40,320
Part 2 - Unsure how to solve this question from Prep Swift
The proposed solution is as follows
I am really lost with the explanation of the proposed solution. I need someone to help breaking it down further for me as I can’t follow the reasoning.
My original method in trying to identify the factor is as follows:
10!
10 / 2 = 5 (note: divide by the smallest prime first which is 2)
5 / 5 = 1 (note: the next factorisation prime is 5)
Therefore, the factors are 2^1 and 5^1 or just 2 and 5. But clearly my method is wrong.