結果

問題 No.700 LOVE
ユーザー nanaenanae
提出日時 2018-07-20 23:11:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 1,928 ms
コンパイル使用メモリ 71,588 KB
実行使用メモリ 56,572 KB
最終ジャッジ日時 2023-09-30 05:28:46
合計ジャッジ時間 5,295 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,860 KB
testcase_01 AC 120 ms
55,840 KB
testcase_02 AC 120 ms
55,660 KB
testcase_03 AC 121 ms
55,512 KB
testcase_04 AC 124 ms
55,756 KB
testcase_05 AC 123 ms
56,064 KB
testcase_06 AC 122 ms
56,196 KB
testcase_07 AC 122 ms
55,936 KB
testcase_08 AC 119 ms
55,824 KB
testcase_09 AC 122 ms
56,144 KB
testcase_10 AC 128 ms
56,572 KB
testcase_11 AC 124 ms
55,780 KB
testcase_12 AC 128 ms
55,940 KB
testcase_13 AC 124 ms
55,892 KB
testcase_14 AC 130 ms
55,668 KB
testcase_15 AC 129 ms
55,928 KB
testcase_16 AC 130 ms
55,760 KB
testcase_17 AC 129 ms
55,840 KB
testcase_18 AC 120 ms
55,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        for (int i = 0; i < n; i++) {
            String s = sc.next();
            if (s.indexOf("LOVE") > -1) {
                System.out.println("YES");
                return;
            }
        }

        System.out.println("NO");
    }
}
0