結果

問題 No.723 2つの数の和
ユーザー NoaSaberNoaSaber
提出日時 2021-03-19 21:04:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 164 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 87,280 KB
実行使用メモリ 94,220 KB
最終ジャッジ日時 2023-08-12 00:49:26
合計ジャッジ時間 5,872 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
71,544 KB
testcase_01 AC 88 ms
71,548 KB
testcase_02 AC 90 ms
71,348 KB
testcase_03 AC 129 ms
86,696 KB
testcase_04 AC 129 ms
90,400 KB
testcase_05 AC 125 ms
88,416 KB
testcase_06 AC 127 ms
88,216 KB
testcase_07 AC 109 ms
81,972 KB
testcase_08 AC 114 ms
83,604 KB
testcase_09 AC 136 ms
90,552 KB
testcase_10 AC 108 ms
81,576 KB
testcase_11 AC 100 ms
78,116 KB
testcase_12 AC 117 ms
84,132 KB
testcase_13 AC 131 ms
90,632 KB
testcase_14 AC 106 ms
80,476 KB
testcase_15 AC 111 ms
82,156 KB
testcase_16 AC 119 ms
85,868 KB
testcase_17 AC 126 ms
88,168 KB
testcase_18 AC 116 ms
88,992 KB
testcase_19 AC 119 ms
90,796 KB
testcase_20 AC 89 ms
71,348 KB
testcase_21 AC 91 ms
71,616 KB
testcase_22 AC 91 ms
71,568 KB
testcase_23 AC 132 ms
94,220 KB
testcase_24 AC 109 ms
80,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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