During Castro's coup, the President, Vice President and President of Congress all resigned, leaving the Chief Justice (Carlos Manuel Piedra) to be sworn in, plead for calm, and then flee to the US Embassy, all over the course of a few hours. When they realised he'd run away, the rebels declared the Presidency vacant.
There was also Siaka Stevens, President of Sierra Leone on two occasions. The first time, he was arrested in a military coup during his swearing-in ceremony.
And then there's the Ur-example of Charles X abdicating, followed by his son Louis XIX twenty minutes later, who was then succeeded by his nephew Henri V for less than a week, until Louis Philippe sorted everything out.