結果

問題 No.723 2つの数の和
ユーザー YamadaYamada
提出日時 2019-01-16 01:12:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 402 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 16,856 KB
最終ジャッジ日時 2023-09-08 17:13:24
合計ジャッジ時間 3,171 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,896 KB
testcase_01 AC 16 ms
8,916 KB
testcase_02 AC 17 ms
8,764 KB
testcase_03 WA -
testcase_04 AC 67 ms
16,512 KB
testcase_05 WA -
testcase_06 AC 64 ms
15,580 KB
testcase_07 WA -
testcase_08 AC 43 ms
12,456 KB
testcase_09 WA -
testcase_10 AC 43 ms
11,512 KB
testcase_11 AC 27 ms
9,700 KB
testcase_12 WA -
testcase_13 AC 61 ms
16,168 KB
testcase_14 AC 27 ms
10,588 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 53 ms
15,688 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 17 ms
8,768 KB
testcase_23 WA -
testcase_24 AC 31 ms
11,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X =map(int,input().split())
l =[0]*(10**5+1)
for i in input().split():
    l[int(i)] += 1
ans = 0
for i in range(max(0,X-10**5),min(10**5+1,(X+2)//2)):
    ans += l[i]*l[X-i]*2
ans -= l[(N+2)//2]**2
print(ans)
0