結果

問題 No.700 LOVE
ユーザー youthfuldays072youthfuldays072
提出日時 2018-06-22 17:28:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 148 ms / 2,000 ms
コード長 412 bytes
コンパイル時間 2,011 ms
コンパイル使用メモリ 71,700 KB
実行使用メモリ 56,284 KB
最終ジャッジ日時 2023-09-30 05:26:19
合計ジャッジ時間 5,520 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,680 KB
testcase_01 AC 124 ms
55,832 KB
testcase_02 AC 127 ms
55,876 KB
testcase_03 AC 128 ms
55,892 KB
testcase_04 AC 126 ms
55,632 KB
testcase_05 AC 125 ms
56,020 KB
testcase_06 AC 125 ms
56,284 KB
testcase_07 AC 125 ms
55,716 KB
testcase_08 AC 125 ms
56,176 KB
testcase_09 AC 123 ms
55,736 KB
testcase_10 AC 136 ms
55,436 KB
testcase_11 AC 125 ms
55,920 KB
testcase_12 AC 148 ms
56,068 KB
testcase_13 AC 132 ms
55,920 KB
testcase_14 AC 137 ms
55,864 KB
testcase_15 AC 137 ms
55,744 KB
testcase_16 AC 135 ms
55,888 KB
testcase_17 AC 134 ms
55,480 KB
testcase_18 AC 125 ms
55,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Main main=new Main();
		main.run();
	}

	void run() {

		Scanner sc=new Scanner(System.in);

		int N=sc.nextInt();
		int M=sc.nextInt();

		String buf="";
		for(int i=0;i<N;i++) {
			buf=sc.next();

			if(buf.matches(".*LOVE.*")) {

				System.out.println("YES");
				return;
			}
		}

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


0