time limit exceeded error with java

why with java i get time limit exceeded most times even if the algorithm is really efficient but even with very inefficient algorithm in C others always are successfull and it is not the case that i am not using BufferedReader for input-output in java.