in turbo 3.1 version u can use long which is 32 bit.
and before submit u make it long long which 64 bit, in judge complier support it. it may be gcc compiler.
the name of problem the Fibonacci Freeze . So you have to freeae/store it. becasue for 5000th fib u need to genarate upto 4999'th and so on. So there is repeating. What will be the conditon if 5000 have 100 times in judge input. No doubt that it will cause TLE