結果

問題 No.723 2つの数の和
ユーザー YamadaYamada
提出日時 2019-01-13 03:01:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 184 bytes
コンパイル時間 821 ms
コンパイル使用メモリ 10,572 KB
実行使用メモリ 23,456 KB
最終ジャッジ日時 2023-08-25 15:14:17
合計ジャッジ時間 3,322 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
18,644 KB
testcase_01 AC 29 ms
18,392 KB
testcase_02 AC 30 ms
18,360 KB
testcase_03 AC 88 ms
21,924 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 102 ms
22,892 KB
testcase_07 AC 64 ms
20,244 KB
testcase_08 AC 70 ms
21,668 KB
testcase_09 AC 99 ms
22,896 KB
testcase_10 RE -
testcase_11 AC 50 ms
18,904 KB
testcase_12 AC 69 ms
21,000 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 64 ms
20,388 KB
testcase_19 RE -
testcase_20 AC 31 ms
18,528 KB
testcase_21 AC 31 ms
18,672 KB
testcase_22 AC 30 ms
18,448 KB
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X =map(int,input().split())
l =[int(i) for i in input().split()]
d ={i:0 for i in range(10**5+1)}
n = 0
for i in l:
    d[i] += 1
for i in range(X+1):
    n += d[i] * d[X-i]
print(n)
0