April Long Challenge 2020 SQRDSUB

My solution link for Squared Subsequences is ::
https://www.codechef.com/viewsolution/31868829
I dont know why it is giving partially correct
please help me !

you have declared n as type int.Thus on line 39 n(n+1) will also give int result irrespective of the type of count.try changing the type of n to ll int.That is one of the problem that i can see there may be more.

1 Like

Thank you for your help .
it works

1 Like