結果

問題 No.18 うーさー暗号
ユーザー yudedakoyudedako
提出日時 2015-11-10 18:34:40
言語 Ruby
(3.3.0)
結果
AC  
実行時間 92 ms / 5,000 ms
コード長 135 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 11,412 KB
実行使用メモリ 15,520 KB
最終ジャッジ日時 2023-09-21 11:57:43
合計ジャッジ時間 2,057 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,136 KB
testcase_01 AC 83 ms
15,140 KB
testcase_02 AC 85 ms
15,256 KB
testcase_03 AC 89 ms
15,304 KB
testcase_04 AC 88 ms
15,520 KB
testcase_05 AC 92 ms
15,484 KB
testcase_06 AC 91 ms
15,480 KB
testcase_07 AC 89 ms
15,500 KB
testcase_08 AC 91 ms
15,416 KB
testcase_09 AC 90 ms
15,348 KB
testcase_10 AC 86 ms
15,276 KB
testcase_11 AC 85 ms
15,008 KB
testcase_12 AC 89 ms
15,328 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

result = ""
 gets.chomp.split(//).each_with_index{|c, idx|
  result << ("A".."Z").to_a[(c.ord - "A".ord - idx - 1) % 26]
}
puts result
0