擅长:python、mysql、java
<p>首先,它构建一个包含以下结果的列表:</p>
<pre><code>for each item in prefs for person1:
if that is also an item in the prefs for person2:
find the difference between the number of prefs for that item for the two people
and square it (Math.pow(x,2) is "x squared")
</code></pre>
<p>然后再加起来。在</p>