結果

問題 No.1882 Areas of Triangle
ユーザー キョウチクキョウチク
提出日時 2022-04-03 14:04:59
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 565 bytes
コンパイル時間 2,738 ms
コンパイル使用メモリ 74,436 KB
実行使用メモリ 50,552 KB
最終ジャッジ日時 2024-05-02 21:33:46
合計ジャッジ時間 5,108 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
36,596 KB
testcase_01 AC 48 ms
36,628 KB
testcase_02 AC 50 ms
36,260 KB
testcase_03 AC 51 ms
36,800 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 47 ms
36,680 KB
testcase_08 AC 48 ms
36,436 KB
testcase_09 AC 48 ms
36,796 KB
testcase_10 AC 49 ms
36,684 KB
testcase_11 AC 51 ms
36,512 KB
testcase_12 AC 49 ms
36,624 KB
testcase_13 AC 47 ms
36,540 KB
testcase_14 AC 47 ms
36,740 KB
testcase_15 AC 48 ms
36,284 KB
testcase_16 AC 55 ms
36,540 KB
testcase_17 AC 90 ms
38,196 KB
testcase_18 AC 84 ms
38,824 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 AC 47 ms
36,780 KB
testcase_26 AC 47 ms
36,496 KB
testcase_27 AC 46 ms
36,512 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