結果

問題 No.700 LOVE
ユーザー Ryota EnokidoRyota Enokido
提出日時 2018-12-10 12:39:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 2,061 ms
コンパイル使用メモリ 71,448 KB
実行使用メモリ 56,212 KB
最終ジャッジ日時 2023-09-30 05:37:53
合計ジャッジ時間 5,557 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,576 KB
testcase_01 AC 129 ms
55,516 KB
testcase_02 AC 131 ms
55,800 KB
testcase_03 AC 130 ms
55,916 KB
testcase_04 AC 128 ms
55,768 KB
testcase_05 AC 129 ms
55,588 KB
testcase_06 AC 129 ms
55,472 KB
testcase_07 AC 129 ms
56,212 KB
testcase_08 AC 129 ms
55,504 KB
testcase_09 AC 129 ms
55,824 KB
testcase_10 AC 133 ms
55,784 KB
testcase_11 AC 133 ms
55,448 KB
testcase_12 AC 130 ms
55,636 KB
testcase_13 AC 134 ms
55,916 KB
testcase_14 AC 133 ms
55,612 KB
testcase_15 AC 133 ms
55,912 KB
testcase_16 AC 133 ms
55,812 KB
testcase_17 AC 134 ms
55,976 KB
testcase_18 AC 134 ms
55,632 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();
          String flag = "NO";
          
          for(int i=0; i<=N; i++){
              String s = sc.nextLine();
              if(s.contains("LOVE")){
                  flag="YES";
              }
          }
          System.out.println(flag);
      }
  }
0