Answer : The sample is, CO (carbon monoxide)
Solution : Given,
Mass of C = 24.50 g
Mass of O = 32.59 g
Molar mass of C = 12 g/mole
Molar mass of O = 16 g/mole
First convert given masses into moles.
Moles of C = 
Moles of O = 
Now for the mole ratio, divide each value of moles by the smallest number of moles calculated.
For C = 
For O = 
The ratio of C : O = 1 : 1
The mole ratio of the element is represented by subscripts in empirical formula.
The Empirical formula =
or, 
Therefore, the sample is, CO (carbon monoxide)