結果

問題 No.18 うーさー暗号
ユーザー nishimanishima
提出日時 2015-10-11 13:26:24
言語 Ruby
(3.3.0)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 153 bytes
コンパイル時間 48 ms
コンパイル使用メモリ 11,420 KB
実行使用メモリ 15,432 KB
最終ジャッジ日時 2023-09-21 11:54:12
合計ジャッジ時間 1,836 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,032 KB
testcase_01 AC 75 ms
15,100 KB
testcase_02 AC 74 ms
15,084 KB
testcase_03 AC 77 ms
15,368 KB
testcase_04 AC 76 ms
15,392 KB
testcase_05 AC 77 ms
15,432 KB
testcase_06 AC 81 ms
15,232 KB
testcase_07 AC 79 ms
15,384 KB
testcase_08 AC 78 ms
15,248 KB
testcase_09 AC 78 ms
15,352 KB
testcase_10 AC 76 ms
15,312 KB
testcase_11 AC 76 ms
15,192 KB
testcase_12 AC 78 ms
15,216 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = '' 
$stdin.gets.chomp.split(//).map{ |i| i.ord }.each_with_index{ |e,i|
	  e += ( 26 - (i + 1)) % 26
	  e -= 26 if e > 'Z'.ord
	  s += e.chr
}
puts s
0