名落孙山 (míng luò Sūn Shān): lit. to fall behind Sun Shan 孫山|孙山[Sun1 Shan1] (who came last in the imperial examination); fig. to fail an exam; to fall behind (in a competition)

名míng落luò孙Sūn山Shān

lit. to fall behind Sun Shan 孫山|孙山[Sun1 Shan1] (who came last in the imperial examination); fig. to fail an exam; to fall behind (in a competition)

Sun Shan came last on the pass list, so the friend whose name fell below his had failed. The gentle, literary way to say that someone did not get in.