CLEVELAND — The Knicks won one for Jeff Hornacek and lost one for lottery odds.

By beating the depleted Cavaliers, 110-98, the Knicks finished with a 29-53 record to end up with the ninth lottery seed. The Knicks would have tied for the eighth seed had they lost Wednesday, in what is likely Hornacek’s final game as the Knicks’ coach.

With the third seed out of view, the Cavaliers actually benefited losing to the Knicks draft-wise as they netted the eighth seed as owner of the Nets pick.

The Knicks will have a 1.7 percent chance of winning the lottery and 6.1 percent chance of rising to a top-three pick. They are most likely to select ninth or 10th (93.5 percent chance) — with a .04 percent chance of falling to 11th.

That didn’t deter Knicks president Steve Mills and GM Scott Perry from standing outside the locker room, high-fiving each player as they entered after the game.

see also

The Knicks took a 57-37 lead at halftime, as LeBron James played the just the first 10:33. He was yanked after notching 10 points to keep his scoring streak of 873 straight games in double-digits alive.

“Obviously not what we wanted,’’ Hornacek said of the season, “but guys continued to play to the end.’’

With James not playing the final three periods and the Cavs’ chances of a third seed shot as the 76ers routed the Bucks, James joined Kevin Love, Rodney Hood and Kyle Korver on the shelf.

The Cavaliers finish with the fourth seed and face the Pacers in the first round.

The Bulls’ loss also means the Knicks will select 37th in the second round with Chicago’s pick.

James finished arguably his finest regular season, playing 82 games for the first time, averaging 27.5 points, 8.7 rebounds and 9.1 assists. And, thanks to James Harden, he still may fall shy of the MVP award.