设买长途车票的有x人,则买短途车票的有50-x人,根据题意可得方程:8x-3(50-x)=180, 8x-150+3x=180, 11x=330, x=30,答:购买长途车票的有30人.故答案为:30.