According to the script, his answer was 5s22s22p63d104s24p64d104f75s25p64d16s2.
Wikipedia in https://en.wikipedia.org/wiki/Gadolinium shows the electron configuration of Gadolinium as "1s2 2s2 2p6 3s2 3p6 3d10 4s2 4p6 4d10 5s2 5p6 4f7 5d1 6s2". In Spock's script answer (expanded to be more readable as "5s2 2s2 2p6 3d10 4s2 4p6 4d10 4f7 5s2 5p6 4d1 6s2") the 4d10 orbital is listed correctly with 10 electrons. However, the end sequence "4d1 6s2" in the script should have been "5d1 6s2". The script answer lists orbitals out of sequence (begins with 5s2) and is also missing the 1s2, 3s2, 3p6 orbitals.