結果
問題 |
No.700 LOVE
|
ユーザー |
|
提出日時 | 2018-08-24 14:39:28 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 679 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-13 00:00:53 |
合計ジャッジ時間 | 2,547 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 8 WA * 8 |
コンパイルメッセージ
Main.rb:19: warning: possibly useless use of == in void context Main.rb:16: warning: possibly useless use of == in void context Main.rb:13: warning: possibly useless use of == in void context Syntax OK
ソースコード
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| current_char = string[length] if current_char == "L" && length - i == 5 length = length + 1 next_char == string[length] if next_char == "O" && length - i == 4 length = length + 1 next_char == string[length] if next_char == "V" && length - i == 3 length = length + 1 next_char == string[length] if next_char == "E" && length - i == 2 print "YES" return end end end end end end