提出 #462031


ソースコード 拡げる

num = gets.chomp.to_i

result = ''
1.upto(num) do |x|
  line = gets.chomp.split
  if line[0] == 'BEGINNING'
    result += line[2][0]
  elsif line[0] == 'MIDDLE'
    result += line[2][(line[2].length - 1)/2]
  else
    result += line[2][-1]
  end
end

puts result

提出情報

提出日時
問題 A - エンド・オブ・ビギニング
ユーザ nanaya
言語 Ruby (2.1.5p273)
得点 100
コード長 276 Byte
結果 AC
実行時間 64 ms
メモリ 4756 KiB

ジャッジ結果

セット名 All
得点 / 配点 100 / 100
結果
AC × 19
セット名 テストケース
All 00_sample_00.txt, 00_sample_01.txt, 10_min_00.txt, 10_min_01.txt, 10_min_02.txt, 20_max_00.txt, 20_max_01.txt, 20_max_02.txt, 90_random_00.txt, 90_random_01.txt, 90_random_02.txt, 90_random_03.txt, 90_random_04.txt, 90_random_05.txt, 90_random_06.txt, 90_random_07.txt, 90_random_08.txt, 90_random_09.txt, 99_medium_00.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 62 ms 4716 KiB
00_sample_01.txt AC 61 ms 4708 KiB
10_min_00.txt AC 62 ms 4716 KiB
10_min_01.txt AC 62 ms 4720 KiB
10_min_02.txt AC 60 ms 4716 KiB
20_max_00.txt AC 59 ms 4716 KiB
20_max_01.txt AC 59 ms 4716 KiB
20_max_02.txt AC 59 ms 4716 KiB
90_random_00.txt AC 60 ms 4716 KiB
90_random_01.txt AC 64 ms 4712 KiB
90_random_02.txt AC 61 ms 4712 KiB
90_random_03.txt AC 58 ms 4712 KiB
90_random_04.txt AC 60 ms 4708 KiB
90_random_05.txt AC 60 ms 4740 KiB
90_random_06.txt AC 60 ms 4712 KiB
90_random_07.txt AC 61 ms 4712 KiB
90_random_08.txt AC 59 ms 4716 KiB
90_random_09.txt AC 61 ms 4756 KiB
99_medium_00.txt AC 61 ms 4712 KiB