結果

問題 No.700 LOVE
コンテスト
ユーザー Yuki Kawabe
提出日時 2018-08-24 14:54:26
言語 Ruby
(4.0.1)
コンパイル:
ruby -w -c _filename_
実行:
ruby _filename_
結果
WA  
実行時間 -
コード長 596 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 238 ms
コンパイル使用メモリ 9,088 KB
実行使用メモリ 15,104 KB
最終ジャッジ日時 2026-03-05 20:27:29
合計ジャッジ時間 2,560 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 15 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #
raw source code

string = readlines

string.each_with_index do |line, index|
  if index + 1 == string.length
    print "NO"
    return
  end
  length = line.length
  length.times do |i|
    index = i
    current_char = line[index]
    if current_char == "L"
      index = index + 1
      next_char = line[index]
      if next_char == "O"
        index = index + 1
        next_char = line[index]
        if next_char == "V"
          index = index + 1
          next_char = line[index]
          if next_char == "E"
            print "YES"
            return
          end
        end
      end
    end
  end

end
0