Cade Cunningham banked in a 3-pointer with less than a second remaining, giving the Detroit Pistons a 116-113 win over Miami and sending the Heat to their ninth consecutive loss.