Skip to main content
3 of 4
Saved 3 bytes thanks to Pavel
AdmBorkBork
  • 43.5k
  • 5
  • 103
  • 284

PowerShell, 54 48 45 bytes

if((gc $PSCOMMANDPATH).length-lt99){1;exit}3#

Try it online!

Try it doubled!

Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .length of that file is either 54 or 108, then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder
Saved 3 bytes thanks to Pavel

AdmBorkBork
  • 43.5k
  • 5
  • 103
  • 284