The electronic configuration of each element is decided by the Aufbau principle which states that the electrons fill orbitals in order of increasing energy levels. The equation is:
1s<2s<2p<3s<3p<4s<3d<4p<5s<4d<5p<6s<4f<5d<6p<7s<5f<6d<7p
For 50 -
1s2 2s2 2p63s23p6 4s23d10 4p65s24d105p2