Fortinet interview question

Python code to find sum of factorial in given array.