Why don't setters keep note about Python's time?

Happened the same thing again in yet another short contest.
Can anyone point out why the same C++ code got accepted but my Python code showed TLE?
Solution: 40735435 | CodeChef [C++ , other user]
Solution: 40735311 | CodeChef [Python, mine]
@admin @ssrivastava990

1 Like
  1. It is an external contest, and hence we have no idea whatsoever about the problem.
  2. Even in our contests, we definitely do not guarantee that every problem is solvable using each of the 50+ languages which we support. Each language is different, and has its own pros and cons, and it is not feasible for us to test each language. We have time limit multipliers for languages which are typically slow (including Python), but that is no guarantee. We also try to keep our time limits pretty loose for easier problems, so that it is as language-independent as possible. But if you plan to do competitive programming seriously and over a long-term, we suggest that you move to a more commonly used language like C++ or Java (preferably C++).

Stop whining and improve your coding style instead.:


Thanks, but no thanks, for the resources. I would definitely prefer to improve my logic than to beautify/decorate my code to squeeze that extra time out of my code.
P.S. Why are you so shy @cubefreak777 to hide your public profile. Let us also see “your” coding style :slight_smile:

Well just in case you’re mistaken I would like to remind you that CodeChef is a COMPETITIVE PROGRAMMING SITE and not some interview preparation site where you’re being tested for your DSA skills ONLY. And as the title suggests competitive programming is competitive so if you’re coding in a slower language like python then you gotta be ready to deal with the potential drawbacks of your chosen language. Codechef isn’t supposed to accommodate your language choice especially if it’s a poor one that is known to be slower than something like C++ (FROM CP PERSPECTIVE). This topic has been discussed multiple times in the past and raising it again is just a waste of time.


Hi @admin,
The intension of push_back() series is to learn-teach new things.
If a guy is improving his knowledge by adding more optimum code snippets then I think the push_back() series is worth hosting.
I created some test cases intentionally up to 10^6 linearly. Because I want to tell you guys, I got rejected in an interview where interviewer discussed some fast IO techniques with me and I was unaware at that time(1 year ago).

Thanks to CodeChef and CodeChef community for constantly letting me push my limits.

Thanks and Regards


AC code using sys.stdin.readline :

Python AC code 4.5 seconds
import sys
input = sys.stdin.readline
t = int(input())
      n= int(input())
1 Like

Because it’s a CP site not interview prep. Next you’ll be saying why don’t setters keep track of all 40+ languages.

1 Like

Oh really, I didn’t knew that…:open_mouth:
Btw, someone said that before in the thread, maybe it slipped out of your sight. Kindly see the thread before commenting the same thing next time :innocent:

There are multiple similar threads. Read them before starting a new post then


Surely, noted. You too keep a special note of it.