TLE Error in Java

Recently, while solving the problem on codechef I faced a TLE error. I was trying to solve the problem using Java which had execution time limit of 1 sec. My program code execution time limit is 0.05 seconds then why I am facing this error. Any suggestions to improve this?

Thank you in Advance!!!