Given the following input: An integer n where n > 0. A string s where s is not empty and s~=[0-9A-Z]+ (alpha-numeric capitals only). Using a standard, simplified QWERTY keyboard (as shown below): 1234567890 QWERTYUIOP ASDFGHJKL ZXCVBNM Perform the following operation: Find the original row that each character is in on the keyboard. Replace the letter with the correct shifted equivalent for n ...
Keyboard layout To clarify any ambiguity over what the standard keyboard layout is below is a list of keys available on each line, including alternate upper keys (accessed using shift). Line 1 Standard: `1234567890-= Line 2 Standard: qwertyuiop[] Line 3 Standard: asdfghjkl;'# Uppercase: ASDFGHJKL Special: Caps Lock Line 4 Standard: \zxcvbnm,./ Alternate: |<>? Uppercase: ZXCVBNM Special: Shift ...
Bash, 108 No Bash answer? Bash answer. grep -Fin is definitely the right tool for this job. This program is in two files. k, 73 bytes `1234567890-=~!@#$%^&*()_+ qwertyuiop[]{}| asdfghjkl;':" zxcvbnm,./<>? There are 5 lines, the last one is a space. If you have trouble reproducing the file, the base64 is ...
ASDFGHJKL
ZXCVBNM"¬¸r'Z" Z (
represents a line break), but that requires two non-keyboard chars, so I guess it isn't legal. But at least you can remove the comma, as it is automatically inserted.
'qwertyuiop[asdfghjkl;zxcvbnm, ' The full keyboard, including the shifted away left-most chars and the extra chars [;,, as well as two extra spaces at the end.
Pyth - 66 62 60 bytes Pretty straightforward approach. Checks if any of substrings len 3 are in any of the rotations of the keyboard. Will be using base encoding for keyboard. .E}Rjb+J+Kc+jkS9"0 qwertyuiop asdfghjkl zxcvbnm"b.tKN_MJ.:z3 Test Suite.