Skip to main content
added 6 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

CJam, 107 bytes

lS/)~\S*\",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm
asdfghjkl
[]\qwertyuiop"N/_32ff^+.+_@fm>s\ser

Try it online in the [CJam interpreter][1]. [1]: http

How it works

lS/)   e# Read one line from STDIN, split at spaces and pop the last chunk.
~\S*\  e# Evaluate the popped chunk and join the remaining ones back together.
",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"
       e# Push that string.
A,s(++ e# Concatenate it with "1234567890".
S/     e# Split at spaces.
"zxcvbnm asdfghjkl []\qwertyuiop"
       e# Push that string.
S/     e# Split at spaces. (`N/' would split at linefeeds.)
_32ff^ e# XOR each character of a copy with 32.
+      e# Concatenate the copies.
.+     e# Perform vectorized concatenation. This pushes the following array:
          [ ",./zxcvbnm" ";'asdfghjkl" "[]\qwertyuiop" "<>?ZXCVBNM"
           ":\"ASDFGHJKL" "{}|QWERTYUIOP" "_+~!@#$%^&*()" "-=`1234567890" ]
_@fm>  e# Rotate each chunk by the number of character specified in the input.
s\s    e# Flatten this array and the original.
er     e# Perform transliteration.

[1]://cjam.aditsu.net/#code=lS%2F http://cjam.aditsu.net/#code=lS%2F)~%5CS*%5C%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%0Aasdfghjkl%0A%5B%5D%5Cqwertyuiop%22N%2F_32ff%5E%2B.%2B_%40fm%3Es%5Cser&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

CJam, 107 bytes

lS/)~\S*\",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm
asdfghjkl
[]\qwertyuiop"N/_32ff^+.+_@fm>s\ser

Try it online in the [CJam interpreter][1]. [1]: http://cjam.aditsu.net/#code=lS%2F)~%5CS*%5C%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%0Aasdfghjkl%0A%5B%5D%5Cqwertyuiop%22N%2F_32ff%5E%2B.%2B_%40fm%3Es%5Cser&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

CJam, 107 bytes

lS/)~\S*\",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm
asdfghjkl
[]\qwertyuiop"N/_32ff^+.+_@fm>s\ser

Try it online in the [CJam interpreter][1].

How it works

lS/)   e# Read one line from STDIN, split at spaces and pop the last chunk.
~\S*\  e# Evaluate the popped chunk and join the remaining ones back together.
",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"
       e# Push that string.
A,s(++ e# Concatenate it with "1234567890".
S/     e# Split at spaces.
"zxcvbnm asdfghjkl []\qwertyuiop"
       e# Push that string.
S/     e# Split at spaces. (`N/' would split at linefeeds.)
_32ff^ e# XOR each character of a copy with 32.
+      e# Concatenate the copies.
.+     e# Perform vectorized concatenation. This pushes the following array:
          [ ",./zxcvbnm" ";'asdfghjkl" "[]\qwertyuiop" "<>?ZXCVBNM"
           ":\"ASDFGHJKL" "{}|QWERTYUIOP" "_+~!@#$%^&*()" "-=`1234567890" ]
_@fm>  e# Rotate each chunk by the number of character specified in the input.
s\s    e# Flatten this array and the original.
er     e# Perform transliteration.

[1]: http://cjam.aditsu.net/#code=lS%2F)~%5CS*%5C%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%0Aasdfghjkl%0A%5B%5D%5Cqwertyuiop%22N%2F_32ff%5E%2B.%2B_%40fm%3Es%5Cser&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

added 6 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

CJam, 103107 bytes

llS/)~"~\S*\",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm
asdfghjkl
[]\qwertyuiop"N/_32ff^+.+_@fm>:+\:+er+_@fm>s\ser

Try it online in the [CJam interpreter][1]. [1]: http://cjam.aditsu.net/#code=l#code=lS%2F)~%22%2C~%5CS*%5C%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%0Aasdfghjkl%0A%5B%5D%5Cqwertyuiop%22N%2F_32ff%5E%2B.%2B_%40fm%3E%3A%2B%5C%3A%2Ber&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203%2B_%40fm%3Es%5Cser&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

CJam, 103 bytes

l)~",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm
asdfghjkl
[]\qwertyuiop"N/_32ff^+.+_@fm>:+\:+er

Try it online in the [CJam interpreter][1]. [1]: http://cjam.aditsu.net/#code=l)~%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%0Aasdfghjkl%0A%5B%5D%5Cqwertyuiop%22N%2F_32ff%5E%2B.%2B_%40fm%3E%3A%2B%5C%3A%2Ber&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

CJam, 107 bytes

lS/)~\S*\",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm
asdfghjkl
[]\qwertyuiop"N/_32ff^+.+_@fm>s\ser

Try it online in the [CJam interpreter][1]. [1]: http://cjam.aditsu.net/#code=lS%2F)~%5CS*%5C%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%0Aasdfghjkl%0A%5B%5D%5Cqwertyuiop%22N%2F_32ff%5E%2B.%2B_%40fm%3Es%5Cser&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

edited body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

CJam, 102103 bytes

l)~",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm  
asdfghjkl []\qwertyuiop"S
[]\qwertyuiop"N/_32ff^+.+_@fm>:+\:+er

Try it online in the [CJam interpreter][1]. [1]: http://cjam.aditsu.net/#code=l)~%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%20asdfghjkl%20%5B%5D%5Cqwertyuiop%22S%2F_32ff%5E%2B%2B%2BS%2F%22zxcvbnm%0Aasdfghjkl%0A%5B%5D%5Cqwertyuiop%22N%2F_32ff%5E%2B.%2B_%40fm%3E%3A%2B%5C%3A%2Ber&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

CJam, 102 bytes

l)~",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm asdfghjkl []\qwertyuiop"S/_32ff^+.+_@fm>:+\:+er

Try it online in the [CJam interpreter][1]. [1]: http://cjam.aditsu.net/#code=l)~%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%20asdfghjkl%20%5B%5D%5Cqwertyuiop%22S%2F_32ff%5E%2B.%2B_%40fm%3E%3A%2B%5C%3A%2Ber&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

CJam, 103 bytes

l)~",./ ;'  <>? :\"  _+~!@#$%^&*() -=`"A,s(++S/"zxcvbnm 
asdfghjkl
[]\qwertyuiop"N/_32ff^+.+_@fm>:+\:+er

Try it online in the [CJam interpreter][1]. [1]: http://cjam.aditsu.net/#code=l)~%22%2C.%2F%20%3B'%20%20%3C%3E%3F%20%3A%5C%22%20%20_%2B~!%40%23%24%25%5E%26*()%20-%3D%60%22A%2Cs(%2B%2BS%2F%22zxcvbnm%0Aasdfghjkl%0A%5B%5D%5Cqwertyuiop%22N%2F_32ff%5E%2B.%2B_%40fm%3E%3A%2B%5C%3A%2Ber&input=I%20Wi5h%20I%20h4d%20b3773r%20C%40d3ing%20ski%7B%7Bs%203

Post Undeleted by Dennis
added 49 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825
Loading
Post Deleted by Dennis
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825
Loading