KSUBSUM tle issue

https://www.codechef.com/viewsolution/15580773

https://www.codechef.com/viewsolution/15580738

both these solutions are of the same type , then why is it giving a tle on the first ??

//