Density functional theory of the collective electronic excitations in NanKn clusters