I’m someone who crammed their way through 4 years of computer engineering exams at a challenging university. It’s possible. It’s hard and the worst few weeks of life before exams, but it’s possible.
Can confirm. There's 0 retention. Maybe if I kept cramming over an extended period of time I could retain it. Typically though I stop after taking the exam so within about a week or two things I thought I understood disappeared.