Getting different verdict for same code , please check

problem : CodeChef: Practical coding for everyone

my first submission (AC) : CodeChef: Practical coding for everyone
my second submission (TLE) : CodeChef: Practical coding for everyone

Both of my solutions are same code in python but I get a AC in one whereas I get a TLE in another . Why does this happen ?