結果

問題 No.18 うーさー暗号
ユーザー code-devocode-devo
提出日時 2016-01-05 19:58:19
言語 Ruby
(3.2.2)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 137 bytes
コンパイル時間 34 ms
コンパイル使用メモリ 11,284 KB
実行使用メモリ 15,328 KB
最終ジャッジ日時 2023-09-21 12:02:17
合計ジャッジ時間 1,785 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,328 KB
testcase_01 AC 78 ms
15,136 KB
testcase_02 AC 77 ms
15,280 KB
testcase_03 AC 78 ms
15,160 KB
testcase_04 AC 76 ms
15,092 KB
testcase_05 AC 78 ms
15,168 KB
testcase_06 AC 83 ms
15,304 KB
testcase_07 AC 79 ms
15,248 KB
testcase_08 AC 78 ms
15,248 KB
testcase_09 AC 77 ms
15,136 KB
testcase_10 AC 77 ms
15,308 KB
testcase_11 AC 77 ms
15,164 KB
testcase_12 AC 78 ms
15,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

S = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
L = S.length
puts gets.chomp.chars.map.with_index{|c,idx| S[(S.index(c) + (L - 1 - idx % L)) % L]}.join
0