Self-Improvement
Your Task
You must create a self-mutable program that, when run, outputs a non-zero integer and also overwrite 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.
Restrictions
- 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 banned from the entire site.