So what happens in such a situation? The Twelfth Amendment throws it to the House of Representatives. I I figure if the Supreme Court got a chance to choose in 2000, Congress should get a shot this time. How cool would that be? But the vote comes with a twist: "the House of Representatives shall choose immediately, by ballot, the President. But in choosing the President, the votes shall be taken by states, the representation from each state having one vote. "
For those wondering, that vote on party lines would come out for the Democrats (26-22 with 2 state delegations splitting evenly) in today's Congress. That includes the delegations from Mississippi, Arkansas, the Dakotas, Tennessee, and North Carolina going from the Democratic candidate. Wikipedia has the details.