Nifty 50 closed at 24,072.75, down 0.02%; Sensex ended at 77,186.87, up 1.40 points