TOSRT - TIME LIMIT EXCEEDED

This Program runs fine except for poor time limit condition in codechef.com - Question setter must have thought otherwise