Skip to main content
3 of 4
deleted 78 characters in body

Self-Improvement

Your Task

You must create a self-mutable program that, when run, outputs a non-zero integer and also overwrites the file with a program that outputs double the number.

For example, if I run the program self-improvement and it outputs 10, it must output 20 when I run it the second time, output 40 the next time, and so on.

Additional Notes

  • You must not rely on any file on the computer other than your program.
  • Said program must consist of only one file.
  • Of course, no loopholes that are banned from the entire site.
  • You can assume that your program won't go tested beyond the range -2^16 to 2^16-1.