Continuous symmetries of Lagrangians and exact solutions of discrete equations