POWPOW2 spoj problem

Ans=“https://ide.codingblocks.com/s/37403
I didn’t find an error in my code anyone please help ??

try to tally

In your code you use different approach to calculate t5 I directly find factorial using inverse Euler
can u expalin ur approach and t1 or t2 explain this also i can’t understand ???