結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,840 KB
testcase_01 AC 125 ms
55,908 KB
testcase_02 AC 129 ms
55,780 KB
testcase_03 AC 131 ms
55,808 KB
testcase_04 AC 127 ms
55,940 KB
testcase_05 AC 126 ms
55,528 KB
testcase_06 AC 128 ms
55,700 KB
testcase_07 AC 127 ms
55,656 KB
testcase_08 AC 127 ms
56,180 KB
testcase_09 AC 132 ms
56,024 KB
testcase_10 AC 135 ms
55,972 KB
testcase_11 AC 127 ms
55,928 KB
testcase_12 AC 133 ms
55,724 KB
testcase_13 AC 131 ms
56,000 KB
testcase_14 AC 133 ms
55,844 KB
testcase_15 AC 134 ms
56,076 KB
testcase_16 AC 133 ms
55,512 KB
testcase_17 AC 132 ms
56,064 KB
testcase_18 AC 126 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.contains("LOVE")) {
                System.out.println("YES");
                return;
            }
        }

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