結果

問題 No.2925 2-Letter Shiritori
ユーザー toshiro_yanagi
提出日時 2025-05-10 15:28:45
言語 Ruby
(3.4.1)
結果
RE  
実行時間 -
コード長 477 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 8,100 KB
実行使用メモリ 30,712 KB
平均クエリ数 1.00
最終ジャッジ日時 2025-05-10 15:28:50
合計ジャッジ時間 5,384 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 2
other RE * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

## %%
require "clipboard"
$gets = Clipboard.paste.encode("cp932").split("\n").reverse
$readlines = Clipboard.paste.encode("cp932")
require "set"

class Start
  def main
    _ = input
    echo "? aa"
    while true
      x = readlines.gsub("\r", "").split("\n")
      break if x.size >= 2
      y = x[0]
      break if y.include?("!")
      echo "? #{y[-1]}a"
    end
  end

  protected

  def echo(*x)
    print(*x)
    puts
  end

  def input = gets.chomp
end

Start.new.main
0