結果

問題 No.723 2つの数の和
ユーザー NoaSaberNoaSaber
提出日時 2021-03-19 20:56:01
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 168 bytes
コンパイル時間 1,338 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 94,792 KB
最終ジャッジ日時 2023-08-12 00:27:51
合計ジャッジ時間 6,407 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
76,008 KB
testcase_01 AC 90 ms
71,820 KB
testcase_02 AC 91 ms
71,672 KB
testcase_03 AC 131 ms
86,216 KB
testcase_04 AC 149 ms
90,320 KB
testcase_05 AC 146 ms
88,396 KB
testcase_06 AC 138 ms
88,336 KB
testcase_07 AC 118 ms
82,104 KB
testcase_08 AC 122 ms
83,728 KB
testcase_09 AC 140 ms
90,412 KB
testcase_10 AC 125 ms
81,616 KB
testcase_11 AC 109 ms
77,772 KB
testcase_12 AC 124 ms
84,152 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X=map(int,input().split())
a=list(map(int,input().split()))
from collections import Counter
a=Counter(a)
ans=0
for i in range(X+1):
   ans+=a[i]*a[X-i]
print(ans)
   
0