結果
問題 | No.700 LOVE |
ユーザー | okuramasafumi |
提出日時 | 2020-11-06 21:34:15 |
言語 | Ruby (3.3.0) |
結果 |
AC
|
実行時間 | 90 ms / 2,000 ms |
コード長 | 338 bytes |
コンパイル時間 | 56 ms |
コンパイル使用メモリ | 11,328 KB |
実行使用メモリ | 15,372 KB |
最終ジャッジ日時 | 2023-09-30 05:59:42 |
合計ジャッジ時間 | 2,748 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 90 ms
15,184 KB |
testcase_01 | AC | 90 ms
15,372 KB |
testcase_02 | AC | 84 ms
15,260 KB |
testcase_03 | AC | 84 ms
15,348 KB |
testcase_04 | AC | 84 ms
15,252 KB |
testcase_05 | AC | 88 ms
15,252 KB |
testcase_06 | AC | 83 ms
15,096 KB |
testcase_07 | AC | 84 ms
15,320 KB |
testcase_08 | AC | 84 ms
15,124 KB |
testcase_09 | AC | 83 ms
15,180 KB |
testcase_10 | AC | 84 ms
15,308 KB |
testcase_11 | AC | 84 ms
15,316 KB |
testcase_12 | AC | 84 ms
15,164 KB |
testcase_13 | AC | 84 ms
15,308 KB |
testcase_14 | AC | 84 ms
15,136 KB |
testcase_15 | AC | 84 ms
15,240 KB |
testcase_16 | AC | 84 ms
15,100 KB |
testcase_17 | AC | 82 ms
15,128 KB |
testcase_18 | AC | 82 ms
15,156 KB |
コンパイルメッセージ
Syntax OK
ソースコード
class PhraseFinder def initialize(phrase = 'LOVE') @n, _ = gets.split(' ').map(&:to_i) @phrase = phrase @found = false end def find! @n.times do @found = true and break if found? end puts @found ? 'YES' : 'NO' end private def found? gets.include?(@phrase) end end PhraseFinder.new.find!