Wrong Answer in Sumssum in summing sums

https://hack.codingblocks.com/contests/c/547/846

Getting one wrong ans out of 5 test cases !
Whats wrong.
i did using matrix exponentiation making linear recurrence as
f(n)=(l-2)f(n-1) + (l-1)f(n-2)
where l is the length of arr,

Link to my code
https://ide.codingblocks.com/s/43398

Test case might have some problem as all are getting max 80.
Share your code link.

Cheers!

1 Like

https://ide.codingblocks.com/s/43398

https://ide.codingblocks.com/s/43398