Adsorption of oxygen on potassium-covered Pt(111) and Fe(110)