結果

問題 No.1882 Areas of Triangle
ユーザー キョウチクキョウチク
提出日時 2022-04-03 14:04:59
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 565 bytes
コンパイル時間 2,666 ms
コンパイル使用メモリ 72,200 KB
実行使用メモリ 52,336 KB
最終ジャッジ日時 2023-08-15 10:02:34
合計ジャッジ時間 5,198 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
49,624 KB
testcase_01 AC 38 ms
49,196 KB
testcase_02 AC 38 ms
48,976 KB
testcase_03 AC 39 ms
49,068 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 39 ms
49,336 KB
testcase_08 AC 38 ms
49,132 KB
testcase_09 AC 39 ms
49,452 KB
testcase_10 AC 37 ms
49,192 KB
testcase_11 AC 38 ms
49,500 KB
testcase_12 AC 37 ms
49,192 KB
testcase_13 AC 39 ms
49,356 KB
testcase_14 AC 39 ms
49,104 KB
testcase_15 AC 37 ms
49,144 KB
testcase_16 AC 48 ms
50,948 KB
testcase_17 AC 74 ms
52,336 KB
testcase_18 AC 73 ms
50,720 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 AC 37 ms
49,064 KB
testcase_26 AC 37 ms
49,076 KB
testcase_27 AC 38 ms
49,104 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
public class test2{
    public static void main(String[] args) throws IOException{
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    String[] line=br.readLine().split(" ");
    int N=Integer.parseInt(line[0]);
    int K=Integer.parseInt(line[1]);
    line=br.readLine().split(" ");
    int[] A=new int[N];
    for(int i=0;i<N;i++) A[i]=Integer.parseInt(line[i]);
    int ansN=0;
    for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        if(A[i]*A[j]>=K*2) ansN++;
      }
    }
    System.out.println(ansN);
  }
}
0