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


  • 0
    lucashongyuanzhang  commented on June 6, 2022, 8:26 a.m.

    read it if you understand it


  • 0
    dchoo333  commented on Sept. 12, 2021, 6: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?


  • -3
    medmoj  commented on Dec. 29, 2020, 10:21 p.m. edit 2

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


    • 10
      Xyene  commented on Dec. 30, 2020, 12:58 a.m.

      Please re-read the Scoring section.


      • 0
        medmoj  commented on Feb. 16, 2021, 1:18 a.m.

        Solved, thanks!


  • 3
    huanghy1228  commented on Nov. 18, 2020, 12:46 a.m.

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


  • 4
    narwhalblast  commented on Oct. 8, 2020, 5: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.


  • 12
    hjanday  commented on June 15, 2020, 1:39 p.m.

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


  • -15
    jaydenchu2003  commented on Jan. 26, 2020, 1:32 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -16
    avid  commented on Nov. 2, 2018, 7:28 p.m. edited

    This comment is hidden due to too much negative feedback. Show it anyway.


    • 16
      kingW3  commented on Nov. 2, 2018, 8:28 p.m. edited

      Your score will be (\frac 9 N)^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.


      • 0
        dchoo333  commented on Oct. 11, 2021, 7:51 a.m.

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


        • 7
          Nils_Emmenegger  commented on Oct. 11, 2021, 9: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~.


          • 0
            dchoo333  commented on Oct. 12, 2021, 9:57 p.m.

            Thank you very much! :)


  • -25
    bobhob314  commented on Jan. 4, 2015, 1:43 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • -26
      bobhob314  commented on Jan. 4, 2015, 1:54 a.m.

      This comment is hidden due to too much negative feedback. Show it anyway.


  • -21
    moladan123  commented on Dec. 14, 2014, 1:51 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • 12
      FatalEagle  commented on Dec. 14, 2014, 2:10 a.m.

      Make an infinite loop with as little code as possible.