結果

問題 No.700 LOVE
ユーザー Yuki KawabeYuki Kawabe
提出日時 2018-08-24 14:54:26
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 596 bytes
コンパイル時間 577 ms
コンパイル使用メモリ 11,288 KB
実行使用メモリ 15,388 KB
最終ジャッジ日時 2023-09-03 19:58:32
合計ジャッジ時間 3,506 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 69 ms
15,036 KB
testcase_02 AC 69 ms
15,048 KB
testcase_03 AC 68 ms
15,032 KB
testcase_04 WA -
testcase_05 AC 70 ms
15,084 KB
testcase_06 AC 71 ms
15,164 KB
testcase_07 AC 70 ms
15,040 KB
testcase_08 AC 70 ms
15,228 KB
testcase_09 AC 81 ms
15,324 KB
testcase_10 AC 84 ms
15,236 KB
testcase_11 AC 73 ms
15,144 KB
testcase_12 AC 72 ms
15,288 KB
testcase_13 AC 77 ms
15,068 KB
testcase_14 AC 70 ms
15,100 KB
testcase_15 AC 73 ms
15,040 KB
testcase_16 AC 78 ms
15,136 KB
testcase_17 AC 74 ms
15,144 KB
testcase_18 AC 73 ms
15,104 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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