Logic for this question

Can you help me with approach to this question…i am not able to develop the logic as it contain factorial of large np???

@anantgovil123 refer this
(https://www.geeksforgeeks.org/factorial-large-number/)