Down 30-18 at halftime and still trailing 33-20 with 17:43 remaining, the Quakers (6-18, 3-4) scored nine unanswered points, six by Brooks.
Penn missed its first field goal of the second half, then went 16 of 20 the rest of the way while also making 15 of 19 free throws.
Tied at 48 with 4:44 left, Lewis and Miles Cartwright made back-to-back layups and Lewis hit a 3-pointer for a seven-point cushion.
The Big Green (6-16, 2-6) could get no closer than five thereafter.
Lewis, who had scored a combined 14 points over the Quakers' previous 11 games, was 5 of 6 from the field.
Gabas Maldunas, whose 19 points and 10 rebounds led the Big Green, surpassed 500 career points in two seasons.
Is there a link between recruiting wins and success? Kentucky and LSU are among teams that have recruited well, but haven't reached their expectations.
Purdue junior forward Vincent Edwards, who has averaged 19.0 points in the NCAA tournament, has decided not to pursue the NBA for now.
Kansas-Kentucky is not only the headliner of the Big 12/SEC Challenge but arguably the most intriguing. We rank all the games in the January event.