Montana is the least affordable U.S. state for homebuyers. The median home price listing in July was nearly $650,000, a report from Realtor.com found.