Tā kǎo qián yì wǎn línshíbàofójiǎo, jūrán méng guò le.
She crammed the night before the exam and somehow managed to pass by guessing.
Tips
history
From Tang poet Meng Jiao's 《读经》: 垂老抱佛脚,教妻读黄经 — an old man who turns to Buddhism only in his final years. Originally about deathbed piety; now the go-to phrase for exam cramming and last-ditch effort.
usage
Colloquial and very common. Students' favorite self-deprecating phrase. Slightly negative — implies you should have prepared earlier.