結果

問題 No.723 2つの数の和
ユーザー yamax3232
提出日時 2018-08-10 12:00:11
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 414 bytes
コンパイル時間 2,101 ms
コンパイル使用メモリ 74,304 KB
実行使用メモリ 76,460 KB
最終ジャッジ日時 2024-09-23 05:38:20
合計ジャッジ時間 6,269 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other TLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

package Main;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int count =0;
		int s=0;
		int[] al=new int[100000];
 		Scanner kb=new Scanner(System.in);
		int n=kb.nextInt();
		int x=kb.nextInt();
		while(kb.hasNextInt())al[s]=(kb.nextInt());s++;
		
		for(int i=0;i<n;i++)
			for(int j=0;j<n;j++)
				if(al[i]+al[j]==x)
					count++;
		System.out.println(count);		
	}

}
0