Exchange and correlation potentials for K-shell electrons