結果

問題 No.723 2つの数の和
ユーザー Mr.Fuku
提出日時 2018-08-07 16:53:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 277 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,712 KB
最終ジャッジ日時 2024-09-19 18:27:25
合計ジャッジ時間 2,247 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 3 RE * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X = map(int,input().split())
num = list(map(int,input().split()))
n_list = [0]*100000

for i in num:
    n_list[i] += 1
cnt = 0
right = X
for left in range(X//2):
    cnt+=n_list[left]*n_list[right]*2
    right-=1
if X%2==0:
    cnt += n_list[right]**n_list[right]
print(cnt)
0