Kǎoshì qián línshí-bàofójiǎo, shì diǎnxíng de bìngjíluàntóuyī.
Cramming the night before an exam is a classic case of panicking and trying anything.
Tips
history
From 红楼梦 Chapter 57, where Baoyu quotes 病急乱投医 as a ready-made saying, showing it was already idiomatic in Qing-era speech.
memory
Literal: 'illness urgent, randomly seek doctors.' The image is someone in a panic trying quack after quack because the disease is scary. Extends perfectly to any panic-driven, unfiltered search for solutions.