結果
問題 | No.723 2つの数の和 |
ユーザー |
![]() |
提出日時 | 2022-03-12 14:53:08 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 86 ms / 2,000 ms |
コード長 | 195 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 82,192 KB |
実行使用メモリ | 104,792 KB |
最終ジャッジ日時 | 2024-09-16 21:33:54 |
合計ジャッジ時間 | 3,277 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
from collections import defaultdict n,x = map(int,input().split()) a = list(map(int,input().split())) b = defaultdict(int) ans = 0 for i in a: b[i] += 1 for i in a: ans += b[x-i] print(ans)