提出 #67534


ソースコード 拡げる

MAP = {
  'b'=>'1', 'c'=>'1',
  'd'=>'2', 'w'=>'2',
  't'=>'3', 'j'=>'3',
  'f'=>'4', 'q'=>'4',
  'l'=>'5', 'v'=>'5',
  's'=>'6', 'x'=>'6',
  'p'=>'7', 'm'=>'7',
  'h'=>'8', 'k'=>'8',
  'n'=>'9', 'g'=>'9',
  'z'=>'0', 'r'=>'0'
}

while true do
  n = gets
  break if n == nil
  w = gets.downcase.chomp.split

  space = false
  ans = w.map{|word|
    word.split('').map{|c| MAP[c] }.join
  }
  ans.delete("")
  ans = ans.join(" ")

  puts ans
end

提出情報

提出日時
問題 B - ルイス・キャロルの記憶術
ユーザ jimon
言語 Ruby (1.9.3)
得点 100
コード長 472 Byte
結果 AC
実行時間 98 ms
メモリ 4364 KiB

ジャッジ結果

セット名 All
得点 / 配点 100 / 100
結果
AC × 27
セット名 テストケース
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 01_rand_00.txt, 01_rand_01.txt, 01_rand_02.txt, 01_rand_03.txt, 01_rand_04.txt, 01_rand_05.txt, 01_rand_06.txt, 01_rand_07.txt, 01_rand_08.txt, 01_rand_09.txt, 01_rand_10.txt, 01_rand_11.txt, 01_rand_12.txt, 01_rand_13.txt, 01_rand_14.txt, 01_rand_15.txt, 01_rand_16.txt, 01_rand_17.txt, 01_rand_18.txt, 01_rand_19.txt, 10_min_01.txt, 10_min_02.txt
ケース名 結果 実行時間 メモリ
00_sample_01.txt AC 57 ms 4108 KiB
00_sample_02.txt AC 56 ms 4104 KiB
00_sample_03.txt AC 55 ms 4108 KiB
00_sample_04.txt AC 56 ms 4112 KiB
00_sample_05.txt AC 56 ms 4108 KiB
01_rand_00.txt AC 90 ms 4236 KiB
01_rand_01.txt AC 86 ms 4364 KiB
01_rand_02.txt AC 72 ms 4220 KiB
01_rand_03.txt AC 67 ms 4236 KiB
01_rand_04.txt AC 80 ms 4232 KiB
01_rand_05.txt AC 61 ms 4236 KiB
01_rand_06.txt AC 67 ms 4232 KiB
01_rand_07.txt AC 78 ms 4236 KiB
01_rand_08.txt AC 68 ms 4236 KiB
01_rand_09.txt AC 73 ms 4240 KiB
01_rand_10.txt AC 67 ms 4236 KiB
01_rand_11.txt AC 98 ms 4236 KiB
01_rand_12.txt AC 68 ms 4232 KiB
01_rand_13.txt AC 72 ms 4232 KiB
01_rand_14.txt AC 59 ms 4236 KiB
01_rand_15.txt AC 78 ms 4364 KiB
01_rand_16.txt AC 71 ms 4236 KiB
01_rand_17.txt AC 61 ms 4232 KiB
01_rand_18.txt AC 68 ms 4236 KiB
01_rand_19.txt AC 68 ms 4236 KiB
10_min_01.txt AC 53 ms 4152 KiB
10_min_02.txt AC 56 ms 4096 KiB