Dear Student
The outermost shell in the metals will consist 1, 2 or 3 electrons whereas the outermost shell of non metals will consist 5,6 or 7 electrons. So, if atomic number of an element is given write its electronic configuration then you can easily know whether it is a metal or a non metal.
Regards