Sensex gains 918 points to settle at 77,550, while the Nifty advances 275 points to close at 24,050