Skip to main content
edited tags
Link
deleted 8 characters in body
Source Link
Addison Crump
  • 11.3k
  • 1
  • 45
  • 91

Inspired by this default for IO.

The Task

Write a program that, given an input integer x between 0 and 255, crashes with exit code x.

Restrictions

  • You may not call anything which is intended directly for exit code output (System.exit(x), returning from main, etc.). Instead, your program must cause an error or crash which will cause, with a probability of 1, the program to exit with the input integer.
  • In this case, the words "error" and "crash" means that the program caused some fatal unintended exception, wherein a method, operation or otherwise was used incorrectly that caused an irreversible failure.
  • You may not directly cause the error by throwing it directly. You must cause it by using a method, function, or otherwise whose purpose serves a different function (i.e. attempting to execute a file write to a read-only directory).
  • You must have at least two exit codes 0 and 1 accounted for in your program.
  • Termination of the process with the use of signals is banned. (Reasoning may be found in this discussion)

Scoring

Your program's score is determined by the number of supported exit codes, where code concision is tiebreaker. The greatest number of supported exit codes wins!

Inspired by this default for IO.

The Task

Write a program that, given an input integer x between 0 and 255, crashes with exit code x.

Restrictions

  • You may not call anything which is intended directly for exit code output (System.exit(x), returning from main, etc.). Instead, your program must cause an error or crash which will cause, with a probability of 1, the program to exit with the input integer.
  • In this case, the words "error" and "crash" means that the program caused some fatal unintended exception, wherein a method, operation or otherwise was used incorrectly that caused an irreversible failure.
  • You may not directly cause the error by throwing it directly. You must cause it by using a method, function, or otherwise whose purpose serves a different function (i.e. attempting to execute a file write to a read-only directory).
  • You must have at least exit codes 0 and 1 accounted for in your program.
  • Termination of the process with the use of signals is banned. (Reasoning may be found in this discussion)

Scoring

Your program's score is determined by the number of supported exit codes, where code concision is tiebreaker. The greatest number of supported exit codes wins!

Inspired by this default for IO.

The Task

Write a program that, given an input integer x between 0 and 255, crashes with exit code x.

Restrictions

  • You may not call anything which is intended directly for exit code output (System.exit(x), returning from main, etc.). Instead, your program must cause an error or crash which will cause, with a probability of 1, the program to exit with the input integer.
  • In this case, the words "error" and "crash" means that the program caused some fatal unintended exception, wherein a method, operation or otherwise was used incorrectly that caused an irreversible failure.
  • You may not directly cause the error by throwing it directly. You must cause it by using a method, function, or otherwise whose purpose serves a different function (i.e. attempting to execute a file write to a read-only directory).
  • You must have at least two exit codes accounted for in your program.
  • Termination of the process with the use of signals is banned. (Reasoning may be found in this discussion)

Scoring

Your program's score is determined by the number of supported exit codes, where code concision is tiebreaker. The greatest number of supported exit codes wins!

added 16 characters in body
Source Link
Addison Crump
  • 11.3k
  • 1
  • 45
  • 91

Inspired by this default for IO.

The Task

Write a program that, given an input integer x between 0 and 255, crashes with exit code x.

Restrictions

  • You may not call anything which is intended directly for exit code output (System.exit(x), returning from main, etc.). Instead, your program must cause an error or crash which will cause, with a probability of 1, the program to exit with the input integer.
  • In this case, the words "error" and "crash" means that the program caused some fatal unintended exception, wherein a method, operation or otherwise was used incorrectly that caused an irreversible failure.
  • You may not directly cause the error by throwing it directly. You must cause it by using a method, function, or otherwise whose purpose serves a different function (i.e. attempting to execute a file write to a read-only directory).
  • You must have at least exit codes 0 and 1 accounted for in your program.
  • Termination of the process with the use of signals is banned. (Reasoning may be found in this discussion)

Scoring

Your program's score is determined by the program's length divided by the factorial of the number of supported exit codes, where code concision is tiebreaker. Smallest scoreThe greatest number of supported exit codes wins!

Inspired by this default for IO.

The Task

Write a program that, given an input integer x between 0 and 255, crashes with exit code x.

Restrictions

  • You may not call anything which is intended directly for exit code output (System.exit(x), returning from main, etc.). Instead, your program must cause an error or crash which will cause, with a probability of 1, the program to exit with the input integer.
  • In this case, the words "error" and "crash" means that the program caused some fatal unintended exception, wherein a method, operation or otherwise was used incorrectly that caused an irreversible failure.
  • You may not directly cause the error by throwing it directly. You must cause it by using a method, function, or otherwise whose purpose serves a different function (i.e. attempting to execute a file write to a read-only directory).
  • You must have at least exit codes 0 and 1 accounted for in your program.
  • Termination of the process with the use of signals is banned. (Reasoning may be found in this discussion)

Scoring

Your program's score is determined by the program's length divided by the factorial of the number of supported exit codes. Smallest score wins!

Inspired by this default for IO.

The Task

Write a program that, given an input integer x between 0 and 255, crashes with exit code x.

Restrictions

  • You may not call anything which is intended directly for exit code output (System.exit(x), returning from main, etc.). Instead, your program must cause an error or crash which will cause, with a probability of 1, the program to exit with the input integer.
  • In this case, the words "error" and "crash" means that the program caused some fatal unintended exception, wherein a method, operation or otherwise was used incorrectly that caused an irreversible failure.
  • You may not directly cause the error by throwing it directly. You must cause it by using a method, function, or otherwise whose purpose serves a different function (i.e. attempting to execute a file write to a read-only directory).
  • You must have at least exit codes 0 and 1 accounted for in your program.
  • Termination of the process with the use of signals is banned. (Reasoning may be found in this discussion)

Scoring

Your program's score is determined by the number of supported exit codes, where code concision is tiebreaker. The greatest number of supported exit codes wins!

added 7 characters in body
Source Link
Addison Crump
  • 11.3k
  • 1
  • 45
  • 91
Loading
edited tags
Link
user41805
  • 13.4k
  • 6
  • 43
  • 88
Loading
Tweeted twitter.com/StackCodeGolf/status/821577751891165184
deleted 13 characters in body
Source Link
Addison Crump
  • 11.3k
  • 1
  • 45
  • 91
Loading
added 186 characters in body
Source Link
Addison Crump
  • 11.3k
  • 1
  • 45
  • 91
Loading
Source Link
Addison Crump
  • 11.3k
  • 1
  • 45
  • 91
Loading