test cases failed
https://ide.codingblocks.com/#/s/23630
Facto sum in array 1.0
https://ide.codingblocks.com/#/s/23721
Here is the corrected version. Basically you can not compute factorial of numbers >10 and store them in integer format. Thus you should take mod 107 while computing factorial itself.