結果

問題 No.18 うーさー暗号
ユーザー iwamotiwamot
提出日時 2016-01-01 23:20:51
言語 Ruby
(3.3.0)
結果
AC  
実行時間 88 ms / 5,000 ms
コード長 164 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 11,296 KB
実行使用メモリ 15,456 KB
最終ジャッジ日時 2023-09-21 12:02:02
合計ジャッジ時間 2,185 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,300 KB
testcase_01 AC 81 ms
15,092 KB
testcase_02 AC 84 ms
15,108 KB
testcase_03 AC 86 ms
15,344 KB
testcase_04 AC 84 ms
15,268 KB
testcase_05 AC 85 ms
15,232 KB
testcase_06 AC 87 ms
15,244 KB
testcase_07 AC 87 ms
15,308 KB
testcase_08 AC 88 ms
15,456 KB
testcase_09 AC 87 ms
15,380 KB
testcase_10 AC 84 ms
15,108 KB
testcase_11 AC 84 ms
15,104 KB
testcase_12 AC 86 ms
15,044 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = []
gets.chomp.split('').each_with_index do |c, i|
  codepoint = c.ord - (i + 1)
  codepoint += 26 while codepoint < 'A'.ord
  a << codepoint.chr
end
puts a.join
0