In this competition, you must have an answer to a number that must always be 12, no matter the input. Here is my entry is stated below.
Input M
10-M→V
2+M
V+Ans
Let's break this code down. For this example, let's say the input is 21 (M=21). For the first part of the code, 10-M=-11. The value -11 is stored into V.
Then, 2 is added to the input value. 2+M is 23.
Lastly, we add the variables V and Ans. So, we get 12 out of these because -11+23=12.
Note: This is not the best code, will output 12 for most values. Too big values will NOT equal 12. You may enter values from -9999999999999 to 9999999999999 (13 digits). Program size: 14 bytes
Rules
- Make your code as short as possible, needs to be less than 100 bytes. The program name does not count.
- Do NOT use my code, use your own.
- Make sure the code is usable on any programmable-friendly calculator.
- Must include any value with the Input command (must be a whole integer, no fractions or decimals) with an output of 12.
- Do not assume you will get the award immediately. Give others a chance.
- You must use calculations. This code is considered cheating, and will not qualify:
Input M
12
Reward
The person who creates the best code will be rewarded with a 1-night Red Box movie gift card! Give this a shot!
If you win, you will receive a private message with the code attached. If you have any questions, please contact me, your site administrator, or moderator.
Hewwo, my name is Achak Claw. I was formerly BioHazard.