Questions tagged [radiation-hardening]
This tag is for challenges which require answers to still work when a random edit to the source code is made.
31
questions
6
votes
1
answer
251
views
Irradiated Polyglots
Design a function or program that, when run normally, outputs the triangular numbers. However, when any single character is deleted, the program/function should not function in the original ...
24
votes
8
answers
5k
views
Make a Hello World using as many bytes as possible
Write a program that outputs the exact string:
jan ale o, toki!
("Hello, world" but in toki pona to prevent builtins.)
with an optional trailing newline.
...
32
votes
21
answers
4k
views
Pass on your radiation
The task here is pretty simple. You should write a program that takes a string as input and outputs it (that is a cat program).
Additionally when the \$n\$th byte of your program is removed (without ...
16
votes
1
answer
532
views
How short can you get?
You are to write a program that, when given an integer between 1 and 5 (or 0 and 4 if you wish to use 0-indexing), outputs one of Code, ...
2
votes
1
answer
238
views
Number of characters skipped determines code printed [closed]
Write a program which, when every nth character is skipped, it prints n. For example, if every 2nd character is skipped, it prints 2.
Example
n=0
foobar
Output:...
20
votes
2
answers
707
views
Write a radiation-hardened irradiator
The task is to write a radiation-hardened irradiator. What do I mean by that, exactly?
An irradiator is a program that, when given a string as input, will output all possible versions of the string ...
10
votes
1
answer
284
views
Radioactive Bit Checking
Note: This is the radiation-hardening version of my previous challenge Pristine Bit Checking. This should be much more difficult than that one.
Write a program/function that takes two integers in the ...
-4
votes
3
answers
132
views
Geiger counter prime generation [closed]
This challenge is quite simple to conceptualise, but likely a lot harder to execute.
In this challenge, the program will have to detect the number N of its characters that have been randomly changed (...
14
votes
2
answers
731
views
Error-detecting Self-repairing Program
Your task is to create a program where if any one character is deleted, it will detect which character was deleted and then re-insert the deleted character in its own source file.
For instance, if ...
11
votes
0
answers
470
views
Radiation is Painful
A radiation-hardened quine can take a hit and stay standing, but nobody ever said that the quine can't be a wuss about it.
For this challenge, you should write a quine that:
If no characters are ...
7
votes
1
answer
324
views
A Radiation Hardened Palindromic Quine
There are radiation hardened quines, palindromic quines, but has anyone tried both?!
I think not!
Rules
So the challenge here is to make a quine that if any symbol is deleted it prints its original ...
14
votes
5
answers
673
views
Self Scoring Program
We have a challenge to output your own score, but it seems like all the answers there just hardcode the output and that's boring1. So lets have a new challenge. Your program must output its own ...
31
votes
8
answers
5k
views
What did we forget?
Your task is to write a non-empty computer program comprised of some sequence of bytes. If we choose a particular byte in the program and remove all instances of it from the program, the modified ...
38
votes
14
answers
3k
views
Make a Geiger Counter
A Geiger counter is a device that is used to detect radiation.
We will be making a Geiger counter program.
As we all know, when radiation hits a computer program it removes exactly 1 byte at random. ...
20
votes
3
answers
831
views
Make a Radiation Hardened Quine
Your task is to make a quine, that is a non-empty computer program that prints it's own source without reading it. In addition if you remove any one byte from your original program the new program ...
28
votes
7
answers
1k
views
Radiation Detector!
A radiation-hardened program is a program where, if any character of the code is removed, the program will still function the same. For this question, we'll be writing a program that detects when it ...
11
votes
0
answers
246
views
Simulate Alpha Decay
Alpha Decay is a kind of radiation decay where every time the atom "decays", it loses a helium nucleus (an alpha particle). This means that an atom loses 2 protons and 2 neutrons each time. ...
15
votes
1
answer
701
views
Mutation-hardened quine
Your task is to make a program that prints out its own source.
"Hey, we already have this challenge, and tons of variations of it! Why are you making another one?" you may ask, but this one is going ...
140
votes
87
answers
23k
views
Hello, World! (Every other character)
Write a program that prints "Hello, World!".
But also, if you take only the first, third, fifth, etc. characters of your program, the resulting program should still print "Hello, World!".
If your ...
10
votes
1
answer
382
views
Radiation hardened cyclic quine polyglot
Challenge
Write two programs that:
run in two different programming languages.
These may not be two versions of one language.
when one program is run, it outputs the second program, and vice versa....
26
votes
5
answers
2k
views
Same code different characters
Note: This challenge only allows answers in compiled languages
Task
Your task is pretty simple, make two different programs that when compiled result in the same output.
Scoring
Here is where the ...
14
votes
14
answers
1k
views
Rearrangeable Code Bowling
Code-Bowling Challenge
Write a program or function that produces the same output, no matter how you re-arrange the source code. (Output can't be an error)
Pangram Scoring
Your score is the amount ...
19
votes
3
answers
775
views
Meta radiation hardener
Background
On this site, we occasionally have questions requiring programs to be "radiation hardened"; this means that the program has to be able to survive the deletion of one or more bytes, no ...
19
votes
1
answer
2k
views
Detect if your program has been mutated
Write a program that terminates without an error.
If any single byte is substituted by any other byte the program should output
CORRUPTED
Do not read your ...
76
votes
15
answers
6k
views
Error 404: Character Not Found
Scenario
One of your friends is struggling on a homework assignment. He needs a simple program which prints the first 404 natural numbers:
...
40
votes
2
answers
2k
views
Radiation softened quine
It's simple: Make a proper quine where if you remove any character, it's still a quine.
The difference between this and a radiation hardened quine is that if your program is ...
43
votes
3
answers
5k
views
Radiation Hardened Quine
As you should (hopefully) know, a radiation hardened quine is a quine that you can remove any one character from and still print its original, pre-modified source. The thing is, with most of these you ...
77
votes
27
answers
8k
views
More is less and less is more
Anybody can make the output of a program bigger by adding characters, so let's do the exact opposite.
Write a full program, an inner function or a snippet for a REPL environment in a language of your ...
83
votes
16
answers
7k
views
Fault-Tolerant Hello World
At the end of your interview, the Evil Interviewer tells you, "We make all of our applicants take a short coding test, to see if they really know what they are talking about. Don't worry; it's ...
15
votes
13
answers
1k
views
Transposed, primes, oh my!
The task is simple: your program reads an integer as an input, and prints whether it is a prime or not. You can print "yes/no", "true/false" or anything what unambiguously ...
122
votes
41
answers
17k
views
Write a program that always outputs "2012" - even if it's modified!
This idea is not mine, though I don't know where it originated. I once met it in a programming contest very long ago (1998, if I remember correctly). The task is to write a program in your favorite ...