A Factorial Problem

Hey. I really need to understand what is happening here. Can you please ellaborate the code for me?

Like what is the purpose of mp?

@aiman.mumtaz,
Have you understood the logic of solving the problem itself?, we will move to explanation of implementation, only after we establish that.

No. I didn’t understand it completely. Especially the non prime part.

@aiman.mumtaz,
Please read this carefully and repeatedly(if necessary) and try to understand, it’s basically just a mathematical problem.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.