結果

問題 No.1735 C#
ユーザー simansiman
提出日時 2021-11-13 15:59:39
言語 Ruby
(3.4.1)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 174 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,160 KB
最終ジャッジ日時 2024-11-27 12:37:23
合計ジャッジ時間 1,381 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = 'CDEFGABC'
S = gets.chomp

list = []
s.each_char do |c|
  list << c

  if %w(A C D F G).include?(c)
    list << c + '#'
  end
end

idx = list.index(S)
puts list[idx + 1]
0