CJam、50バイト
r{i",ÙZ°^ªýx´|"257b27b=A+Ab}%2ew::.-::z2fb:+
コードに印刷できない文字が含まれていることに注意してください。
CJamインタプリタでオンラインで試してください。パーマリンクが機能しない場合は、このpasteからコードをコピーします。
バックグラウンド
我々は、位置割り当て開始0に9、上部の行の文字に10に18ホーム行の文字および20に26下段に文字へ。
26文字すべてのアルファベット順の位置は次のとおりです。
[10 24 22 12 2 13 14 15 7 16 17 18 26 25 8 9 0 3 11 4 6 23 1 21 5 20]
これは長さ26の配列です。配列はCJamでラップアラウンドし、文字hのコードポイントは104 = 4×26であるため、各文字の位置にアクセスできるように配列を7単位左に回転します。コードポイント。
[15 7 16 17 18 26 25 8 9 0 3 11 4 6 23 1 21 5 20 10 24 22 12 2 13 14]
次に、27を底とする数値の要素を考慮してこの配列をエンコードし、結果の整数を257に変換します。
[6 153 44 8 217 90 176 156 94 24 170 253 147 120 180 124]
各整数を対応するUnicode文字で置き換えることにより、ソースコードから文字列を取得します。
使い方
r              e# Read a whitespace separated token from STDIN.
{              e# For each character:
  i            e#   Push its code point.
  ",ÙZ°^ªýx´|" e#   Push that string.
  257b27b      e#   Convert from base 257 to base 27.
  A+Ab         e#   Add 10 and convert to base 10.
               e#   Examples: 7 -> [1 7], 24 -> [3 4]
}%             e#
2ew            e# Push all overlapping slices of length 2.
::.-           e# Subtract the corresponding components of the pairs in each slice.
::z            e# Apply absolute value to the results.
2fb            e# Convert each to integer (base 2).
               e# Example: [2 5] -> 2 × 2 + 5 = 9
:+             e# Add the distances.