Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Question

If a compiled language is used, the program must delete the compiled executable (but need not delete the source file). If an interpreted language is used, the program must delete the source file.

My opening bid:

Python (29 characters)

import os;os.remove(__file__)

Edit: to prevent solutions like rm -rf /, the program must not delete anything except the executable or source file.

html,body{margin:0;padding:0;height:100%;overflow:hidden}
 <iframe src="https://xmikee1.github.io/ppcg-leaderboard/?id=19355" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe>

If a compiled language is used, the program must delete the compiled executable (but need not delete the source file). If an interpreted language is used, the program must delete the source file.

My opening bid:

Python (29 characters)

import os;os.remove(__file__)

Edit: to prevent solutions like rm -rf /, the program must not delete anything except the executable or source file.

If a compiled language is used, the program must delete the compiled executable (but need not delete the source file). If an interpreted language is used, the program must delete the source file.

My opening bid:

Python (29 characters)

import os;os.remove(__file__)

Edit: to prevent solutions like rm -rf /, the program must not delete anything except the executable or source file.

html,body{margin:0;padding:0;height:100%;overflow:hidden}
 <iframe src="https://xmikee1.github.io/ppcg-leaderboard/?id=19355" width="100%" height="100%" style="border:none;">Oops, your browser is too old to view this content! Please upgrade to a newer version of your browser that supports HTML5.</iframe>

edited tags
Link
user62131
user62131
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

If a compiled language is used, the program must delete the compiled executable (but need not delete the source file). If an interpreted language is used, the program must delete the source file.

My opening bid:

Python (29 characters)

import os;os.remove(__file__)

Edit: to prevent solutions like rm -rf / rm -rf /, the program must not delete anything except the executable or source file.

If a compiled language is used, the program must delete the compiled executable (but need not delete the source file). If an interpreted language is used, the program must delete the source file.

My opening bid:

Python (29 characters)

import os;os.remove(__file__)

Edit: to prevent solutions like rm -rf /, the program must not delete anything except the executable or source file.

If a compiled language is used, the program must delete the compiled executable (but need not delete the source file). If an interpreted language is used, the program must delete the source file.

My opening bid:

Python (29 characters)

import os;os.remove(__file__)

Edit: to prevent solutions like rm -rf /, the program must not delete anything except the executable or source file.

Loading
Tweeted twitter.com/#!/StackCodeGolf/status/426930404952920064
added 167 characters in body
Source Link
EMBLEM
  • 2.4k
  • 21
  • 30
Loading
Source Link
EMBLEM
  • 2.4k
  • 21
  • 30
Loading

AltStyle によって変換されたページ (->オリジナル) /