There's something wrong with your keyboard. The Shift key has a mind of its own. Every time you type a character you have no idea whether it will come out shifted or not (though it is 50-50). Besides the standard character keys, nothing on the keyboard is functional. There is no mouse or other means of input.
Somehow you know the only way to fix things is to write a program that outputs
Dear Computer, please stop giving me shift! to stdout. Luckily your IDE is open and you are capable of running a program, but of course as you type it you won't know which characters will be shifted.
What sequence of key-presses would you use to write a program that has the best possible chance of working on the first try?
You are using a standard QWERTY keyboard, so there are 50 character keys you can press.
Unshifted versions (47 only):
Shifted versions (47 only):
The last 3 keys are Enter, Tab, and Space, which are the same shifted and unshifted.
A sequence of N of these characters has 2N - (whitespace char count) ways it might have been output if you had typed them with your faulty keyboard. For example, typing A Space m might have yielded
a m or
A m or
a M or
Write a program these characters and look at all of its 2N - (whitespace char count) possible shift combinations. The more combinations that output
Dear Computer, please stop giving me shift! the better. Your score is the number of working combinations (valid programs) divided by the total number of combinations. The highest score wins.
- For valid programs, printing precisely
Dear Computer, please stop giving me shift!and nothing else to stdout should be the only side effect.
- Valid programs should not take input.
- Invalid programs can do anything whatsoever.
- Comments may be used anywhere.
- Whitespace answers cannot win because getting a 100% score is (relatively) trivial. You may still submit a Whitespace solution for fun.
- Your program must be at most 1024 characters long.
Stop giving me shift! to
Dear Computer, please stop giving me shift! to allow for more complex answers. Existing answers may stay the way they are if desired.