結果

問題 No.18 うーさー暗号
ユーザー fshutofshuto
提出日時 2019-04-30 20:27:28
言語 Ruby
(3.3.0)
結果
AC  
実行時間 95 ms / 5,000 ms
コード長 141 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 11,520 KB
実行使用メモリ 15,644 KB
最終ジャッジ日時 2023-08-30 02:28:17
合計ジャッジ時間 2,357 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,068 KB
testcase_01 AC 86 ms
15,204 KB
testcase_02 AC 89 ms
15,284 KB
testcase_03 AC 95 ms
15,632 KB
testcase_04 AC 89 ms
15,336 KB
testcase_05 AC 89 ms
15,504 KB
testcase_06 AC 91 ms
15,468 KB
testcase_07 AC 92 ms
15,480 KB
testcase_08 AC 93 ms
15,644 KB
testcase_09 AC 92 ms
15,484 KB
testcase_10 AC 85 ms
15,192 KB
testcase_11 AC 86 ms
15,176 KB
testcase_12 AC 89 ms
15,476 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

ans = ''
gets.chomp.chars.each_with_index do |e, i|
  te = ('A'..'Z').to_a[(('A'..'Z').to_a.index(e) - (i+1)) % 26]
  ans += te
end
puts ans
0