結果

問題 No.1882 Areas of Triangle
ユーザー キョウチク
提出日時 2022-04-03 14:04:59
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 565 bytes
コンパイル時間 3,087 ms
コンパイル使用メモリ 72,876 KB
実行使用メモリ 39,120 KB
最終ジャッジ日時 2024-11-23 16:20:27
合計ジャッジ時間 5,831 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4 WA * 1
other AC * 15 RE * 9
権限があれば一括ダウンロードができます

ソースコード

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