結果

問題 No.723 2つの数の和
ユーザー Mr.FukuMr.Fuku
提出日時 2018-08-07 16:53:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 277 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 21,716 KB
最終ジャッジ日時 2023-10-19 22:28:02
合計ジャッジ時間 2,706 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,748 KB
testcase_01 AC 31 ms
10,748 KB
testcase_02 AC 31 ms
10,748 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 WA -
testcase_07 AC 53 ms
14,156 KB
testcase_08 AC 57 ms
15,188 KB
testcase_09 WA -
testcase_10 RE -
testcase_11 AC 42 ms
11,804 KB
testcase_12 WA -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 31 ms
10,748 KB
testcase_21 AC 30 ms
10,748 KB
testcase_22 AC 31 ms
10,748 KB
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

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