设长途车票乘客有x人,0.8x-0.3×(50-x)=18, 0.8x-15+0.3x=18, 1.1x-15+15=18+15, 1.1x÷1.1=33÷1.1, x=30,答:购买长途车票的有30人.故答案为:30.