Python Infinite Loop

View as PDF

Submit solution

Points: 7 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Python

Almost everywhere on this site, we have always held infinite loops under poor regard. This is very unfair to infinite loops because they have their use too! Here, we compensate for the prejudice against them by awarding you points for creating one. However, there is a catch. You must do it as short as possible.

Input Specification

There are no inputs.

Output Specification

There are no outputs. If you output anything, you will crash.

Scoring

Your score will be \left(\frac 9 N\right)^5 \times 7, where N is the length of your program in bytes, if your program works. Otherwise, it will receive a score of zero.


Comments


  • 2
    dchoo333  commented on Sept. 12, 2021, 2:52 a.m. edited

    This is a very interesting 7-point problem. Also, I submitted something in PyPy3, got an MLE, but then still got 7 points?


  • 1
    medmoj  commented on Dec. 29, 2020, 5:21 p.m. edit 2

    How come I got AC but no points? Does anyone know?


    • 7
      Xyene  commented on Dec. 29, 2020, 7:58 p.m.

      Please re-read the Scoring section.


      • 1
        medmoj  commented on Feb. 15, 2021, 8:18 p.m.

        Solved, thanks!


  • 3
    huanghy1228  commented on Nov. 17, 2020, 7:46 p.m.

    Most problems need to use inputs and outputs. This feels impossible...


  • 4
    narwhalblast  commented on Oct. 8, 2020, 1:34 p.m.

    so proud that I got this.. I'm a little confused as to the scoring though, I produced a 10 byte program that scored 6/10 and a 9 byte program that scored 10/10. This doesn't completely match the formula in the description, but I'm proud that I got a 10/10 eventually regardless.


  • 10
    hjanday  commented on June 15, 2020, 9:39 a.m.

    This was a good problem. Kept AC'ed with no points but then I got it! 10/10 would rage again


  • -12
    jaydenchu2003  commented on Jan. 25, 2020, 8:32 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.


  • -7
    edward_he  commented on Dec. 23, 2019, 12:00 a.m. edited

    This comment is hidden due to too much negative feedback. Click here to view it.


    • 3
      sa35577  commented on Dec. 23, 2019, 10:27 a.m.

      As the question states, there are NO outputs.


  • -14
    avid  commented on Nov. 2, 2018, 3:28 p.m. edited

    This comment is hidden due to too much negative feedback. Click here to view it.


    • 15
      kingW3  commented on Nov. 2, 2018, 4:28 p.m.

      Your score will be  (\frac9 N)^5×7 , where N is the length of your program in bytes, if your program works. Otherwise, it will receive a score of zero.


      • 1
        dchoo333  commented on Oct. 11, 2021, 3:51 a.m.

        How do you do an equation like that? I couldn't copy-paste it when I was writing this comment.


        • 4
          Nils_Emmenegger  commented on Oct. 11, 2021, 5:45 p.m. edited

          The DMOJ features a rich Markdown-based syntax, with custom extensions for LaTeX-based display math, and Mathjax-based inline math. See this template for a full feature example (you may copy/paste its content into your editor).

          Source: https://docs.dmoj.ca/#/site/managing_problems.

          You can see how the above equation was written using inspect element: ~\left(\frac 9 N\right)^5 \times 7~.


          • 2
            dchoo333  commented on Oct. 12, 2021, 5:57 p.m.

            Thank you very much! :)


  • 7
    quantum  commented on June 5, 2016, 1:46 p.m.

    I have rewritten the problem to use the new judge, fixing a couple of bugs on the way.


  • -21
    bobhob314  commented on Jan. 3, 2015, 8:43 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.


    • -22
      bobhob314  commented on Jan. 3, 2015, 8:54 p.m.

      This comment is hidden due to too much negative feedback. Click here to view it.


  • -20
    moladan123  commented on Dec. 13, 2014, 8:51 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.


    • 9
      FatalEagle  commented on Dec. 13, 2014, 9:10 p.m.

      Make an infinite loop with as little code as possible.


  • 13
    quantum  commented on Nov. 18, 2014, 10:48 p.m.

    If you output anything, you crash!