The contested states may decide to give their electors to one or another candidate.  Whoever gets 270 wins.  If for some reason someone does NOT get 270, then...  “If neither candidate gets a majority of the 538 electoral votes, the election for President is decided in the House of Representatives, with each state delegation having one vote. A majority of states (26) is needed to win. Senators would elect the Vice-President, with each Senator having a vote. A majority of Senators (51) is needed to win,”   https://trulytimes.com/what-happens-if-nobody-gets-270-electoral-votes.html