Ex-PM Tebboune elected Algeria's president