結果

問題 No.723 2つの数の和
ユーザー rlangevinrlangevin
提出日時 2023-01-03 20:34:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 110,040 KB
最終ジャッジ日時 2023-08-18 00:45:26
合計ジャッジ時間 5,584 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
71,948 KB
testcase_01 AC 95 ms
71,800 KB
testcase_02 AC 98 ms
71,852 KB
testcase_03 AC 140 ms
99,840 KB
testcase_04 AC 150 ms
106,112 KB
testcase_05 AC 147 ms
106,092 KB
testcase_06 AC 147 ms
104,320 KB
testcase_07 AC 124 ms
90,272 KB
testcase_08 AC 127 ms
92,300 KB
testcase_09 AC 158 ms
107,924 KB
testcase_10 AC 125 ms
89,424 KB
testcase_11 AC 109 ms
79,192 KB
testcase_12 AC 132 ms
95,084 KB
testcase_13 AC 157 ms
110,040 KB
testcase_14 AC 117 ms
84,544 KB
testcase_15 AC 128 ms
92,100 KB
testcase_16 AC 142 ms
99,924 KB
testcase_17 AC 152 ms
105,920 KB
testcase_18 AC 119 ms
90,056 KB
testcase_19 AC 123 ms
91,840 KB
testcase_20 AC 93 ms
71,704 KB
testcase_21 AC 91 ms
71,564 KB
testcase_22 AC 92 ms
71,792 KB
testcase_23 AC 142 ms
106,132 KB
testcase_24 AC 117 ms
87,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *

N, X = map(int, input().split())
D = defaultdict(int)
A = list(map(int, input().split()))
for a in A:
    D[a] += 1
    D[X - a] += 0
ans = 0
for a in A:
    ans += D[X - a]
print(ans)
0