結果

問題 No.2547 Did you enjoy Chofu Festival?
ユーザー sysnote8mainsysnote8main
提出日時 2024-02-03 22:28:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 150 ms / 2,000 ms
コード長 585 bytes
コンパイル時間 2,290 ms
コンパイル使用メモリ 75,548 KB
実行使用メモリ 57,960 KB
最終ジャッジ日時 2024-02-03 22:28:14
合計ジャッジ時間 5,092 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
57,868 KB
testcase_01 AC 127 ms
57,712 KB
testcase_02 AC 136 ms
57,960 KB
testcase_03 AC 130 ms
57,812 KB
testcase_04 AC 133 ms
57,712 KB
testcase_05 AC 141 ms
57,688 KB
testcase_06 AC 150 ms
57,956 KB
testcase_07 AC 129 ms
57,576 KB
testcase_08 AC 119 ms
56,792 KB
testcase_09 AC 135 ms
57,848 KB
testcase_10 AC 116 ms
56,680 KB
testcase_11 AC 123 ms
57,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
  public static void log(Object obj) {
    System.out.println(obj.toString());
  }

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    ArrayList<Integer> a = new ArrayList<>();
    ArrayList<Integer> b = new ArrayList<>();
    for(int i=0;i<n;i++) a.add(sc.nextInt());
    for(int i=0;i<n;i++) b.add(sc.nextInt());
    int count = 0;
    for(int i=0;i<n;i++) {
      if(a.get(i) <= b.get(i)) {
        count++;
      }
    }
    log(count);
  }
}
0