Hello,
Either you use the I/Os as input or output pins.
If you use them as inputs, you don't have to add any code, but you must either connect them with one resistor each either to Vdd or Vss.
If you don't use a resistor, just connect the pins directly to Vdd or Vss, there is a chance that the program might crash, and reprogram the I/O ports to be output instead. This will burn the I/Os of the MCU.
If you use one resistor for several I/Os, chanses are that one of them gets to be reprogrammmed as output with the value 1 in the data register, and the other with the value 0. This will burn the output stages in the I/O. So use one resistor for each I/O pin.
The resistor should be about 10 Kohm.
Or you can use the I/Os as outputs. Then you don't have to bother about the resistors. But there is a faint possibility to get ESD/EMI at powerup before the I/Os have been set up as outputs.
As there is no resistors involved, there is no extra current drawn.
Regards,
Ake