Updated: Announcing Variable Time Limits Based on Programming Language

1 min read

Cupcakes,
You’ve asked for it, we’ve done it. A big complaint people have had was the time limits were too strict for programming languages that didn’t start with a C. There are now variable time limits depending on the programming language you have used to submit your solution. The current time limits are as follows (as a multiplier to the time limit listed on the problem page):

  • Java – 2X
  • JS- 2X
  • Python (PYTH and PYTH 3.6) – 5X
  • PyPy 2.6.0 – 2X
  • PyPy3 – 2X
  • Kotlin – 2X
  • Ruby – 3X
  • PHP – 3X
  • Lisp (clisp, sbcl) – 3X
  • Scala – 2X
  • C# – 2X
  • SCM (chicken, guile,qobi) – 3X
  • All other languages – 1X

We will keep updating this post with the latest multipliers, if we make any changes. Solutions will not be rejudged, you will be required to submit new solutions to see if your program now satisfies the time limit conditions.

Cheers,

The Chef

Exciting Updates for the month of June 2022

Updates in the Practice Section We have launched the Practice skill score. It contains Platform statistics: Where you can see the overall stats of...
surajmsharma
1 min read

We’re Celebrating Our Birthday Month, And There’s Some Exciting…

The Chef turns 13 this month, and as we step into our promising teen years, we’d like to bring you some good news.  Special...
debanjan321
1 min read

Exciting updates for February 2022

A month back we re-designed the practice landing page to improve the user experience. That was just the start of some amazing enhancements that...
surajmsharma
1 min read

41 Replies to “Updated: Announcing Variable Time Limits Based on Programming Language”

  1. What happens if tweaking the multipliers results in a submission failing with the new limits which passed with the old limits? Or will time limits only be increased?

  2. What happens if tweaking the multipliers results in a submission failing with the new limits which passed with the old limits? Or will time limits only be increased?

  3. You dont get it, because you do not understand the limitations of virtual machines and interpreted languages as opposed to compiled languages.
    Maybe wikipedia would help you.

  4. You dont get it, because you do not understand the limitations of virtual machines and interpreted languages as opposed to compiled languages.
    Maybe wikipedia would help you.

  5. The reason being that many of these languages are slower in one way or the other as compared to C/C++, so we feel that they should be compensated accordingly. Be rest assured that no one will get an artifical advantage because of using a particular language, and only good algorithms(in any language) will be able to pass successfully in the given limits. I hope that answers your concerns.

  6. The reason being that many of these languages are slower in one way or the other as compared to C/C++, so we feel that they should be compensated accordingly. Be rest assured that no one will get an artifical advantage because of using a particular language, and only good algorithms(in any language) will be able to pass successfully in the given limits. I hope that answers your concerns.

  7. @Anonymous Coward

    Most probably you haven’t used these languages. Else you wouldn’t have called it an “advantage” in the first place. Try running a code with same logic in C and Java and notice the difference in times.

  8. @Anonymous Coward

    Most probably you haven’t used these languages. Else you wouldn’t have called it an “advantage” in the first place. Try running a code with same logic in C and Java and notice the difference in times.

  9. @Anonymous Coward- It appears you are new to programming, cause the question you asked is answered in 8th or 9th grade(at least in ISC I guess). Its great you’re coming on to a site like Codechef for a better exposure! I’d suggest you go and check the best times for one of the trivial problems like Life, Universe, Everything and note the difference in timings.

    Apart from the VM etc. I guess Java’s unicode character set which gives a further burden to the programs….

  10. @Anonymous Coward- It appears you are new to programming, cause the question you asked is answered in 8th or 9th grade(at least in ISC I guess). Its great you’re coming on to a site like Codechef for a better exposure! I’d suggest you go and check the best times for one of the trivial problems like Life, Universe, Everything and note the difference in timings.

    Apart from the VM etc. I guess Java’s unicode character set which gives a further burden to the programs….

  11. Hi, What is the multiplier for C#? The same logic also applies for keeping a higher multiplier for C# as well, since C# code is complied Just In Time.

    Thanks,
    Abhijeet.

  12. Hi, What is the multiplier for C#? The same logic also applies for keeping a higher multiplier for C# as well, since C# code is complied Just In Time.

    Thanks,
    Abhijeet.

  13. #include <iostream>#include <cstdio>int main(void) {unsigned int count=0,i=0;long unsigned int k,n;unsigned int temp;fscanf(stdin,”%uld”,&n);fscanf(stdin,”%uld”,&k);if(k<=10000000){ while(i<n && std::cin>>temp && temp<=1000000000){ if(temp%k==0)count++; i++; } }std::cout<<count; return 0;}WHY TIME LIMIT IS EXCEEDING…………what's wrong with this

  14. #include <iostream>
    #include <cstdio>
    int main(void) {
    unsigned int count=0,i=0;
    long unsigned int k,n;
    unsigned int temp;
    fscanf(stdin,”%uld”,&n);
    fscanf(stdin,”%uld”,&k);
    if(k<=10000000){
    while(i<n && std::cin>>temp && temp<=1000000000){
    if(temp%k==0)count++;
    i++;
    }
    }
    std::cout<<count;
    return 0;
    }

    WHY TIME LIMIT IS EXCEEDING…………what's wrong with this

  15. #include
    #include
    int main(void) {
    unsigned int count=0,i=0;
    long unsigned int k,n;
    unsigned int temp;
    fscanf(stdin,”%uld”,&n);
    fscanf(stdin,”%uld”,&k);
    if(k<=10000000){ while(i>temp && temp<=1000000000){ if(temp%k==0)count++; i++; } } std::cout<

  16. I am having issues getting Haskell to run in the allotted time.  Have you seen requests for a multiplier on Haskell? I am using the same algorithm as efficient solutions in other languages.

  17. Can we have Scala timing at par with Java. it is quiet an overlook to have different times for both if they are using the same JVM the execute the bytecode.

  18. For java you can use java.util.concurrent package which provide TimeUnit enum. Using this enum you can set max execution time for a method and validate execution time.
    PHP also provides a function set_time_limit(). using this function you can dynamically set time limit for a function.
    By these way we can set max execution time for a program.
    I think all programming lagueses have this type of feature.

Leave a Reply