提出 #778559


ソースコード 拡げる

s = gets.chomp
test = "WBWBWWBWBWBW" * 5
ans = 12
12.times do |i|
  if s == test.slice(i, 20)
    ans = i
  end
end
if ans == 0
  puts "Do"
elsif ans == 2
  puts "Re"
elsif ans == 4
  puts "Mi"
elsif ans == 5
  puts "Fa"
elsif ans == 7
  puts "So"
elsif ans == 9
  puts "La"
elsif ans == 11
  puts "Si"
else
  puts nil
end

提出情報

提出日時
問題 C - ピアニスト高橋君
ユーザ jjfifjfjfifj
言語 Ruby (2.3.3)
得点 100
コード長 346 Byte
結果 AC
実行時間 17 ms
メモリ 1788 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 1
AC × 8
セット名 テストケース
Sample example_0.txt
All example_0.txt, handmade_0.txt, handmade_1.txt, handmade_2.txt, handmade_3.txt, handmade_4.txt, handmade_5.txt, handmade_6.txt
ケース名 結果 実行時間 メモリ
example_0.txt AC 17 ms 1788 KiB
handmade_0.txt AC 17 ms 1788 KiB
handmade_1.txt AC 16 ms 1788 KiB
handmade_2.txt AC 16 ms 1788 KiB
handmade_3.txt AC 17 ms 1788 KiB
handmade_4.txt AC 17 ms 1788 KiB
handmade_5.txt AC 17 ms 1788 KiB
handmade_6.txt AC 17 ms 1788 KiB