For hydrogen (H), we can use its atomic mass (1.008 g/mol) and Avogadro's number (6.022 x 10^23 atoms/mol) to calculate the number of atoms:
Number of atoms in 5g of hydrogen = (5g / 1.008 g/mol) * (6.022 x 10^23 atoms/mol)
= 2.99 x 10^24 atoms
For helium (He), we can perform a similar calculation using its atomic mass (4.0026 g/mol):
Number of atoms in 10g of helium = (10g / 4.0026 g/mol) * (6.022 x 10^23 atoms/mol)
= 1.50 x 10^24 atoms
Comparing the number of atoms in 5g of hydrogen (2.99 x 10^24 atoms) and 10g of helium (1.50 x 10^24 atoms), we can conclude that 10g of helium has the least number of atoms.