結果

問題 No.700 LOVE
ユーザー sayuen0sayuen0
提出日時 2018-06-17 14:58:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 518 bytes
コンパイル時間 2,196 ms
コンパイル使用メモリ 71,544 KB
実行使用メモリ 56,084 KB
最終ジャッジ日時 2023-09-30 05:23:27
合計ジャッジ時間 4,849 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
56,052 KB
testcase_01 AC 108 ms
55,768 KB
testcase_02 AC 107 ms
55,984 KB
testcase_03 AC 112 ms
55,844 KB
testcase_04 AC 112 ms
55,688 KB
testcase_05 AC 117 ms
56,056 KB
testcase_06 AC 115 ms
55,736 KB
testcase_07 AC 112 ms
55,748 KB
testcase_08 AC 106 ms
55,748 KB
testcase_09 AC 108 ms
55,444 KB
testcase_10 AC 115 ms
56,084 KB
testcase_11 AC 116 ms
55,508 KB
testcase_12 AC 119 ms
55,512 KB
testcase_13 AC 117 ms
56,056 KB
testcase_14 AC 117 ms
55,884 KB
testcase_15 AC 118 ms
55,736 KB
testcase_16 AC 115 ms
55,936 KB
testcase_17 AC 114 ms
55,828 KB
testcase_18 AC 119 ms
55,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main{
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean isLove =false;
        for(int i = 0; i<n ;i++){
            String s = sc.next();
            if(s.contains("LOVE")){
                isLove = true;
            }
        }
        if(isLove){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
        
    }
}
0