Guest User

Untitled

a guest
Oct 19th, 2017
1,015
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. `1234567890-=~!@#$%^&*()_+qwertyuiop[]QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:"zxcvbnm,./ZXCVBNM<>?
  2.  
  3. "$"
  4. 1
  5.  
  6. "R"
  7. 2
  8.  
  9. "a"
  10. 3
  11.  
  12. "?"
  13. 4
  14.  
  15. "n"
  16. 3
  17.  
  18. " "
  19. 5
  20.  
  21. ?zh@+,4Zmid2c.Bi."0fÀÓ¸[9Ѷ¤KïLäHÉðbÀ`]ü©¬vS"16 2-CzCd3
  22.  
  23. p(A[0].matches("[`0-9-=~!@#$%^&*()_+]")?1:A[0].replace("\n","n").matches("(?i)[asdfghjkl;':"n]")?3:A[0].matches("(?i)[zxcvbnm,.\/<>?]")?4:A[0].matches(" ")?5:2
  24.  
  25. |+++l:"~`0123456789!@#$%^&*()_-=+"z1*l:"asdfghjkl;:'"n"rz0 1 3*l:"zxcvbnm,<.>/? "rz0 1 4 l:dz1 2
  26.  
  27. 2+`qØÆyuiop{}[]|\1dfghjkl;:
  28. '1zxcvbnm,.<>?/"1 `q1 ®bUv)<0} b!1
  29.  
  30. print(int(("~`!1@2#3$4%5^6&7*8(9)0_-+=""qwertyuiop{[}|"+"]"*11+'asdfghjkl;:"n'"'"*13+"zxcvbnm,<.>/""?"*14+" ").index(input().lower())/26)+1)
  31.  
  32. J?<l-c".^$*+?{}[]|()"1]z14+\zrz0?qJd5?:"qwertyuiop[]|"J)2?:"asdfghjkl;':"n"J)3?:"zxcvbnm,./<>?"J)4 1
  33.  
  34. J?<l-c".^$*+?{}[]|()"1]z14+\zrz0 # Escape input if regex metachar
  35. ?qJd5 # Check space
  36. ?:"qwertyuiop[]|"J)2 # Check second row
  37. ?:"asdfghjkl;':"n"J)3 # Check third row
  38. ?:"zxcvbnm,./<>?"J)4 # Check fourth row
  39. 1 # If none of these, must be on first row.
  40.  
  41. `1234567890-=~!@#$%^&*()_+
  42. qwertyuiop[]{}|
  43. asdfghjkl;':"
  44. zxcvbnm,./<>?
  45.  
  46. YDEyMzQ1Njc4OTAtPX4hQCMkJV4mKigpXysKcXdlcnR5dWlvcFtdXHt9fAphc2RmZ2hqa2w7JzoiCnp4Y3Zibm0sLi88Pj8KIA==
  47.  
  48. grep -Fin "$1" k|tail -n3|head -c1
  49.  
  50. grep --fixed-strings --ignore-case --line-number "$1" k|tail --lines=3|head --bytes=1
  51.  
  52. say 1+(/<[-d=~!@#$%^&*()_+/`]>/,/<[qwertyuiop[]\{}|]>/,/<[asdfghjkl;':"n]>/,/<[zxcvbnm,./<>?]>/,' ').first: @*ARGS.lc~~*,:k
  53.  
  54. $_=/[d~`!@#-&(-+_=-]/+/[adfghjkls"':;
  55. ]/i*3+/[bcnmvxz<>,.?/]/i*4+/ /*5||2
  56.  
  57. $i=$argv[1];preg_match("%([!#-&(-+-0-9=@^-`~])|([EIO-RT-UWY[-]eio-rt-uwy{-}])|(["':-;ADF-HJ-LSadf-hj-ls])|([,.-/<>-?B-CM-NVXZb-cm-nvxz])%",$i,$m);echo array_flip($m)[$i];
  58.  
  59. Array ( [0] => 'z', [1] => '', [2] => '', [3] => '', [4] => 'z' )
  60.  
  61. Array ( 'z' => 4, '' => 3 )
  62.  
  63. n=>[`qwertyuiop{}[]|\`,`asdfghjkl;:
  64. '`,`zxcvbnm,.<>?/"`,` `].map(x=>+(x.indexOf(n.toLowerCase())<0)).indexOf(0)+2
  65.  
  66. #define c 2124850936,91714965
  67. b[]={8<<18,0,-218071008,7796<<19,c,c};f(a){return a-32?b[a>>4]>>a%16*2&3:4;}
  68.  
  69. q_" "={;5}{"`1234567890-=~!@#$%^&*()_+qwertyuiop[]QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:" zxcvbnm,./ZXCVBNM<>? "#26/1+}?
  70.  
  71. q e# read input
  72. _" "= e# decide if the input is a space
  73. {;5} e# if it is, push 5
  74. {"..."#26/1+}? e# if it isn't, push the correct row
  75.  
  76. 1 a$="~`!1@2#3$4%5^6&7*8(9)0-_+=qQwWeErRtTyYuUiIoOpP{[}]|aaaaAsSdDfFgGhHjJkKlL:;'"#34#13"zzzzzzzZxXcCvVbBnNmM<,>.?/"+" "*26
  77. 2 INPUT k$: IF k$="" THEN k$=#13
  78. 3 ?CEIL(POS(k$,a$)/26)
  79.  
  80. using C=System.Console;class P{static void Main(string[]a)=>C.Write("`1234567890-=~!@#$%^&*()_+qwertyuiop[]\QWERTYUIOP{}|asdfghjkl;'raASDFGHJKL:"nazxcvbnm,./zzzZXCVBNM<>?zzz ".IndexOf(a[0])/26+1);}
  81.  
  82. using C=System.Console;
  83. class P{
  84. static void Main(string[]a)=>
  85. C.Write("`1234567890-=~!@#$%^&*()_+qwertyuiop[]\QWERTYUIOP{}|asdfghjkl;'raASDFGHJKL:"nazxcvbnm,./zzzZXCVBNM<>?zzz ".IndexOf(a[0])/26+1);
  86. }
Add Comment
Please, Sign In to add comment