結果

問題 No.723 2つの数の和
ユーザー matsukin1111
提出日時 2018-12-12 22:31:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 25,136 KB
最終ジャッジ日時 2024-09-25 03:42:18
合計ジャッジ時間 2,890 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

s = list(map(int,input().split()))
ss = list(map(int,input().split()))
sss = {}
ans = 0
for i in ss:
        if i not in sss:
                sss[i] = 1
        else:
                sss[i] += 1

for a,b in sss.items():
        if s[1] - a in sss:
                ans += b * sss[s[1]-a]

print(ans)
        
0