Among the 18 small balls with the same appearance, there are several balls with two weights of 9 grams and 10 grams. Two of the 18 balls are taken out and placed on the left side of the balance. The other 16 balls are divided into 8 pairs and placed on the right side of the balance. Compare the weights with these two balls, and find that 5 are heavier than those two balls, 2 are lighter than those two balls, and one pair is equal to those two balls. So, what is the total weight of these 18 balls in grams?
外表相同的18个小球中，有9克和10克两种重量的球各若干个，从18个球中取出两个放在天平左边，另外16个球分成8对，分别放在天平右边与这两个球比较重量，发现有5对比那两个球重，有2对比那两个球轻，有一对与那两个球相等．那么，这18个球的总重量是多少克．
<gadget id="calculator">10 + 10</gadget>
<output>20</output>

<gadget id="calculator">20 * 5</gadget>
<output>100</output>

<gadget id="calculator">10 + 9</gadget>
<output>19</output>

<gadget id="calculator">19 * 2</gadget>
<output>38</output>

<gadget id="calculator">9 + 9</gadget>
<output>18</output>

<gadget id="calculator">18 * 2</gadget>
<output>36</output>

<gadget id="calculator">100 + 38 + 36</gadget>
<output>174</output>

<result>174</result>