結果

問題 No.723 2つの数の和
ユーザー kanpurin002kanpurin002
提出日時 2018-11-13 21:50:58
言語 C
(gcc 12.3.0)
結果
TLE  
実行時間 -
コード長 275 bytes
コンパイル時間 1,421 ms
コンパイル使用メモリ 28,664 KB
実行使用メモリ 7,052 KB
最終ジャッジ日時 2023-08-26 00:55:40
合計ジャッジ時間 5,097 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,380 KB
testcase_01 AC 0 ms
4,376 KB
testcase_02 AC 0 ms
4,376 KB
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>

int main(){
	int n,x,i,j,count=0;
	scanf("%d%d",&n,&x);
	int a[n];
	for (i=0;i<n;i++) {
		scanf("%d",&a[i]);
	}
	for (i=0;i<n;i++) {
		for (j=0;j<n;j++) {
			if (x==a[i]+a[j]) {
				count++;
			}
		}
	}
	printf("%d\n",count);
	return 0;
}
0