結果

問題 No.700 LOVE
ユーザー GodNegotoGodNegoto
提出日時 2019-11-26 15:14:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 480 bytes
コンパイル時間 4,110 ms
コンパイル使用メモリ 71,836 KB
実行使用メモリ 57,484 KB
最終ジャッジ日時 2023-09-30 05:45:07
合計ジャッジ時間 6,104 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
55,888 KB
testcase_01 AC 110 ms
55,684 KB
testcase_02 AC 110 ms
55,888 KB
testcase_03 AC 115 ms
55,760 KB
testcase_04 AC 110 ms
55,588 KB
testcase_05 AC 118 ms
55,712 KB
testcase_06 AC 112 ms
55,984 KB
testcase_07 AC 111 ms
55,776 KB
testcase_08 AC 107 ms
55,656 KB
testcase_09 AC 119 ms
55,440 KB
testcase_10 AC 126 ms
55,716 KB
testcase_11 AC 114 ms
55,904 KB
testcase_12 AC 117 ms
56,024 KB
testcase_13 AC 113 ms
55,676 KB
testcase_14 AC 134 ms
55,904 KB
testcase_15 AC 130 ms
55,992 KB
testcase_16 AC 120 ms
55,744 KB
testcase_17 AC 117 ms
57,484 KB
testcase_18 AC 111 ms
54,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package algo;

import java.util.ArrayList;
import java.util.Scanner;

import java.util.*;

public class sample7 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		String a = "NO";
		for(int i=0; i < n; i++) {
			String s = sc.next();
			String s2 = "LOVE";
			if(s.indexOf("LOVE") != -1) {
				a = "YES";
				System.out.println(a);
				return;
			}
			else {
			}
		}
		System.out.println(a);
	}
}
0