結果
問題 |
No.723 2つの数の和
|
ユーザー |
|
提出日時 | 2018-11-23 21:08:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 140 ms / 2,000 ms |
コード長 | 227 bytes |
コンパイル時間 | 781 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 25,356 KB |
最終ジャッジ日時 | 2024-12-24 18:53:47 |
合計ジャッジ時間 | 3,034 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
n,x = map(int,input().split()) num = list(map(int,input().split())) a = {} k = 0 for i in num : if i in a : a[i] += 1 else : a[i] = 1 for j in a : if x - j in a : k += a[j]*a[x-j] print(k)