Estimate what you can realistically review when cramming.
Cramming is a triage problem. Only about eighty percent of available time becomes real review once breaks, setup and fading concentration are accounted for, so dividing that by minutes per topic gives what you can genuinely cover. Applying a retention loss is the honest part: massed practice produces markedly weaker recall than spaced review, so the topics you cover are not all topics you will remember.
Coverage
Topics coverable = floor(available hours x 60 x 0.8 / minutes per topic)
Expected retention
Topics retained = topics covered x (1 - retention loss)
As a last resort it beats not revising, and it is reasonably effective for an exam within twenty-four hours. It performs poorly for anything you need to retain beyond the exam.
Weight by exam marks available and by how much you already know. Topics with high mark weight and shaky recall repay attention far more than familiar material.