Teacher Wang bought basketballs for the school, which cost 540 yuan in total, 50 yuan for each basketball, and 5 yuan for each one if you buy 10 or more basketballs at a time. Do you know how many basketballs Teacher Wang bought in total?
王老师给学校买篮球，共花去540元，每只篮球50元，一次买10只及以上，每只优惠5元，你知道王老师一共买了多少只篮球吗？
<gadget id="calculator">50 - 5</gadget>
<output>45</output>

<gadget id="calculator">540 / 45</gadget>
<output>12</output>

<result>12</result>