A batch of watermelons was priced at a 20% profit, but because of the rain, they had to sell them at a 40% discount, resulting in a loss of 140 yuan. How much did this batch of watermelons cost?
一批西瓜按20%的利润定价，由于下雨，只好按6折出售，结果亏了140元．这批西瓜的成本是多少元？
<gadget id="calculator">1 - 0.72</gadget>
<output>0.28</output>

<gadget id="calculator">140 / 0.28</gadget>
<output>500</output>

<result>500</result>